ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   How do I count cells with text but ignore cells with spaces? (https://www.excelbanter.com/excel-discussion-misc-queries/110859-how-do-i-count-cells-text-but-ignore-cells-spaces.html)

Husker87

How do I count cells with text but ignore cells with spaces?
 
I have a form that users enter names in a column and I need to count them.
Unfortunately some users simple hit the space bar to €śdelete€ť a name instead
of using the clear or delete key. In those cells, with spaces now which
appear to be blank, the cell is treated like it has text in it when I use the
counting functions. Any suggestions on how I count the names only and ignore
the cells that are blank and the cells with just a couple of spaces in them?

What do you think? Thanks.

Biff

How do I count cells with text but ignore cells with spaces?
 
What do you think?

I think you should cut your users fingers off! <g

Try this:

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

Biff

"Husker87" wrote in message
...
I have a form that users enter names in a column and I need to count them.
Unfortunately some users simple hit the space bar to "delete" a name
instead
of using the clear or delete key. In those cells, with spaces now which
appear to be blank, the cell is treated like it has text in it when I use
the
counting functions. Any suggestions on how I count the names only and
ignore
the cells that are blank and the cells with just a couple of spaces in
them?

What do you think? Thanks.




srinehart

How do I count cells with text but ignore cells with spaces?
 
Use the Filter tool, that will get rid of all the blank cells. You can copy
the total document into another worksheet and use the count function and get
your total.

"Husker87" wrote:

I have a form that users enter names in a column and I need to count them.
Unfortunately some users simple hit the space bar to €śdelete€ť a name instead
of using the clear or delete key. In those cells, with spaces now which
appear to be blank, the cell is treated like it has text in it when I use the
counting functions. Any suggestions on how I count the names only and ignore
the cells that are blank and the cells with just a couple of spaces in them?

What do you think? Thanks.



All times are GMT +1. The time now is 07:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com