Count Function

S

Steven

Is there a way to do a counta() on a range of cells to
where it will not count the cell if the cell only has
spaces where the user accidentally hit the spacebar.
Therefore it will only count cells that actually have a
character typed in it.

Thank you,

Steven.
 
J

Jason Morin

If the "empty" cells only have 1 space in them:

=COUNTA(A:A)-COUNTIF(A:A,CHAR(32))

This won't work if the user accidently keys in more than 1
space in a cell.

HTH
Jason
Atlanta, GA
 
S

Steven

Perfect. Thank you.
-----Original Message-----
If the "empty" cells only have 1 space in them:

=COUNTA(A:A)-COUNTIF(A:A,CHAR(32))

This won't work if the user accidently keys in more than 1
space in a cell.

HTH
Jason
Atlanta, GA



.
 
K

Ken Wright

Or

=SUMPRODUCT(--(TRIM(A1:A65535)<>""))

will disregard all cells with just spaces in.
 
Top