Count Function

  • Thread starter Thread starter Steven
  • Start date Start date
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.
 
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
 
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



.
 
Or

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

will disregard all cells with just spaces in.
 
Even better. Thats really incredible. Thanks.
-----Original Message-----
Or

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

will disregard all cells with just spaces in.

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL2K & XLXP

---------------------------------------------------------- ------------------
Attitude - A little thing that makes a BIG difference
---------------------------------------------------------- ------------------






---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.528 / Virus Database: 324 - Release Date: 16/10/2003


.
 
Back
Top