Back Forum Reply New

Count when cell is blank

Hi,
I have a list of data where column x = a number from 1-5, where the number dictates a priority. However column X can also contain blank cells.
I have used the following formula to count the occurences of certain values i.e 1 and 2.
=((COUNTIF($X$2X$700,"1"))+(COUNTIF($X$2X$700,2)))
I also need to be able to count where the cells are blank. These cells do not contain any info such as '0' as they are generated from another report and therefore it wouild be too time consuming to put '0' in the blank fields.
Is there an easy way of identifying/counting all cells which are blank that contain a value in another column i.e. 'Column Y'
Many Thanks
Stewart

Try using
=COUNTBLANK()

Hi Stewart

=SUMPRODUCT(--(X2:X700=""),--(Y2:Y700""))

Either

COUNTBLANK($X$2X$700)

or

COUNTIF($X$2X$700, "")

KRDave

Try:
=COUNTIF($X$2X$700,"")

Just realised that it is not blanks but there is a 'space' in each cell.
Used =SUMPRODUCT(--(X2:X700=" "),--(Y2:Y700"")) modified from Richard Scholler.
Thanks for your help

FWIW, if you use:

Code:
=SUMPRODUCT((TRIM(X2:X700)="")*(Y2:Y700""))
it will cope with either blanks or spaces in column X.
¥
Back Forum Reply New