Ignoring Cells with Only Spaces

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to use the COUNTA function, but I need it to ignore cells that
contain ONLY spaces. I don't want to ignore cells that merely begin or end
with a space, and I don't know how many spaces may be present in the cells I
do want to ignore. Can anyone please help?

Thanks,
Heliocracy
 
That appears to do the opposite of what I'm asking.

If cell A1=" ", COUNTIF(A1,"* ") returns a 1. I need a formula to return a
zero if there are only spaces in cell A1.

Thanks.
 
Try something like this:

=SUMPRODUCT(--(LEN(TRIM(A1:A10))<>0))

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
Yes, that does appear to do it. Thanks.

Ron Coderre said:
Try something like this:

=SUMPRODUCT(--(LEN(TRIM(A1:A10))<>0))

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
I'm glad that worked for you....and thanks for the feedback.

***********
Regards,
Ron

XL2002, WinXP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top