A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Counting non blank cells



 
 
Thread Tools Display Modes
  #1  
Old June 16th, 2004, 01:12 AM
jack evans
external usenet poster
 
Posts: n/a
Default Counting non blank cells

I want to count all the cells in a range that have text in them - I do not want to include any blank cells OR where a formula has returned an empty string. Counta will still count these cells? Any ideas.
--
Jack Evans
  #2  
Old June 16th, 2004, 01:18 AM
Peo Sjoblom
external usenet poster
 
Posts: n/a
Default Counting non blank cells

=SUMPRODUCT(--(A1:A100""))

--


No private emails please, for everyone's
benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom

"jack evans" wrote in message
...
I want to count all the cells in a range that have text in them - I do not

want to include any blank cells OR where a formula has returned an empty
string. Counta will still count these cells? Any ideas.
--
Jack Evans



  #3  
Old June 16th, 2004, 01:32 AM
Harlan Grove
external usenet poster
 
Posts: n/a
Default Counting non blank cells

"Peo Sjoblom" wrote...
=SUMPRODUCT(--(A1:A100""))


Or =COUNTIF(A1:A100,"*")

--
To top-post is human, to bottom-post and snip is sublime.
  #4  
Old June 16th, 2004, 01:59 AM
alk
external usenet poster
 
Posts: n/a
Default Counting non blank cells

=counta(A1:A100)


-----Original Message-----
"Peo Sjoblom" wrote...
=SUMPRODUCT(--(A1:A100""))


Or =COUNTIF(A1:A100,"*")

--
To top-post is human, to bottom-post and snip is sublime.
.

  #5  
Old June 16th, 2004, 09:19 AM
Harlan Grove
external usenet poster
 
Posts: n/a
Default Counting non blank cells

"alk" wrote...
=counta(A1:A100)

....

Reread the OP: "I do not want to include any blank cells OR where a formula
has returned an empty string. Counta will still count these cells?"

COUNTA *does* include cells evaluating to "" in its result, so fails to
satisfy the OP's requirements.


  #6  
Old June 16th, 2004, 10:56 AM
Berend Botje
external usenet poster
 
Posts: n/a
Default Counting non blank cells

You can also do this with 2 for... next statements:

Sub BB

Dim Col as integer
Dim Row as integer
Dim CountingValue as integer

For Col = 1 to 100
Row = 1
For Row = 1 to 100
If trim$(len(cells(row,col).value))0 then CountingValue =
CountingValue +1
End if
Next Row
Next Col

end sub


---
Message posted from http://www.ExcelForum.com/

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


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


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.