View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default testing for non-empty cells

=if(countA(C:C)=0,"All Blank","Blanks: "&rows(C:C)-CountA(C:C))

if you want to find blanks only up to the last used cell

=IF(COUNTA(C:C)=0,"All Blank","Blanks:
"&MATCH(9.99999999999999E+307,C:C)-COUNTA(C:C))

if only numeric values are contained in column C or for only non-numeric
entries:

=IF(COUNTA(C:C)=0,"All Blank","Blanks:
"&MATCH(REPT("Z",255),C:C)-COUNTA(C:C))

Actually, the restriction is only to the type of data in the last populated
cell.



--
Regards,
Tom Ogilvy


Paul James wrote in message
news:ULJWa.46245$uu5.5082@sccrnsc04...
I need to test an entire column to see if there are any non-blank cells in
the column. I've tried writing an expression using CountA(), but I can't
get it to work.

Can anyone tell me how I could test, say, Column C, to see if there are

any
blank cells in that column?

Thank you in advance.

Paul