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 » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

count nonblank cells



 
 
Thread Tools Display Modes
  #1  
Old March 13th, 2010, 03:20 AM posted to microsoft.public.excel.worksheet.functions
ART
external usenet poster
 
Posts: 432
Default count nonblank cells

I have a column B9:B100 on Sheet 1 in Excel 2007 in which each cell includes
a formula (=Sheet2!A9). The results of a search appear on Sheet2, then appear
on Sheet1. (I had to do this cause I learned I could not use an array formula
in cells that have been merged.)

Anyway, the column on Sheet1 may contain numbers/text, and some appear blank
because I replaced the 0s and #N/A with a blank. So, for example, after a
search, there may be numbers/text that appear in B9:B15, and then B16:B100
are "blank" even though they still contain the formula copying text/numbers
from Sheet2.

I want to count how many nonblank cells there are to show how many matches
were foind. None of the counting functions work (e.g., COUNT, COUNTA,
COUNTBLANK, etc.) because I am assuming Excel still sees that a cell,
although appearing blank, still contains a formula, so its not technically
blank.

So, if numbers/text that appear in B9:B15, and then B16:B100 are "blank", I
tried =COUNTA(B9:B100), and get a count 92. Clearly there are not 92 nonblank
cells. There are only 7.

Any thoughts how to count the number of cells showing search results and NOT
count the cells that appear blank and only contain the formula.

Thanks!!!
  #2  
Old March 13th, 2010, 03:31 AM posted to microsoft.public.excel.worksheet.functions
ART
external usenet poster
 
Posts: 432
Default count nonblank cells

Through experimentation, figured it out...

=COUNTIF(B9:B100,"?*")




"Art" wrote:

I have a column B9:B100 on Sheet 1 in Excel 2007 in which each cell includes
a formula (=Sheet2!A9). The results of a search appear on Sheet2, then appear
on Sheet1. (I had to do this cause I learned I could not use an array formula
in cells that have been merged.)

Anyway, the column on Sheet1 may contain numbers/text, and some appear blank
because I replaced the 0s and #N/A with a blank. So, for example, after a
search, there may be numbers/text that appear in B9:B15, and then B16:B100
are "blank" even though they still contain the formula copying text/numbers
from Sheet2.

I want to count how many nonblank cells there are to show how many matches
were foind. None of the counting functions work (e.g., COUNT, COUNTA,
COUNTBLANK, etc.) because I am assuming Excel still sees that a cell,
although appearing blank, still contains a formula, so its not technically
blank.

So, if numbers/text that appear in B9:B15, and then B16:B100 are "blank", I
tried =COUNTA(B9:B100), and get a count 92. Clearly there are not 92 nonblank
cells. There are only 7.

Any thoughts how to count the number of cells showing search results and NOT
count the cells that appear blank and only contain the formula.

Thanks!!!

  #3  
Old March 13th, 2010, 03:38 AM posted to microsoft.public.excel.worksheet.functions
T. Valko
external usenet poster
 
Posts: 15,759
Default count nonblank cells

When you say that the cells contain "numbers/text", what exactly does that
mean? Does it mean the cells contain *either* numbers or text. Or, does it
mean the cells contain alphanumeric strings (which are considered text)?

I want to count how many nonblank cells there are


Try this...

=COUNT(B9:B100)+COUNTIF(B9:B100,"?*")

The COUNT will count any numeric numbers and the COUNTIF will count any text
entries but *exclude* formula blanks.

--
Biff
Microsoft Excel MVP


"Art" wrote in message
...
I have a column B9:B100 on Sheet 1 in Excel 2007 in which each cell
includes
a formula (=Sheet2!A9). The results of a search appear on Sheet2, then
appear
on Sheet1. (I had to do this cause I learned I could not use an array
formula
in cells that have been merged.)

Anyway, the column on Sheet1 may contain numbers/text, and some appear
blank
because I replaced the 0s and #N/A with a blank. So, for example, after a
search, there may be numbers/text that appear in B9:B15, and then B16:B100
are "blank" even though they still contain the formula copying
text/numbers
from Sheet2.

I want to count how many nonblank cells there are to show how many matches
were foind. None of the counting functions work (e.g., COUNT, COUNTA,
COUNTBLANK, etc.) because I am assuming Excel still sees that a cell,
although appearing blank, still contains a formula, so its not technically
blank.

So, if numbers/text that appear in B9:B15, and then B16:B100 are "blank",
I
tried =COUNTA(B9:B100), and get a count 92. Clearly there are not 92
nonblank
cells. There are only 7.

Any thoughts how to count the number of cells showing search results and
NOT
count the cells that appear blank and only contain the formula.

Thanks!!!



  #4  
Old March 14th, 2010, 10:54 AM posted to microsoft.public.excel.worksheet.functions
Ashish Mathur[_2_]
external usenet poster
 
Posts: 1,764
Default count nonblank cells

Hi,

Why does the criteria include both the wildcards. Shouldn't the criteria be
* only I.e. =countif(B9:B100,"*")

--
Regards,

Ashish Mathur
Microsoft Excel MVP

"Art" wrote in message
...
Through experimentation, figured it out...

=COUNTIF(B9:B100,"?*")




"Art" wrote:

I have a column B9:B100 on Sheet 1 in Excel 2007 in which each cell
includes
a formula (=Sheet2!A9). The results of a search appear on Sheet2, then
appear
on Sheet1. (I had to do this cause I learned I could not use an array
formula
in cells that have been merged.)

Anyway, the column on Sheet1 may contain numbers/text, and some appear
blank
because I replaced the 0s and #N/A with a blank. So, for example, after a
search, there may be numbers/text that appear in B9:B15, and then
B16:B100
are "blank" even though they still contain the formula copying
text/numbers
from Sheet2.

I want to count how many nonblank cells there are to show how many
matches
were foind. None of the counting functions work (e.g., COUNT, COUNTA,
COUNTBLANK, etc.) because I am assuming Excel still sees that a cell,
although appearing blank, still contains a formula, so its not
technically
blank.

So, if numbers/text that appear in B9:B15, and then B16:B100 are "blank",
I
tried =COUNTA(B9:B100), and get a count 92. Clearly there are not 92
nonblank
cells. There are only 7.

Any thoughts how to count the number of cells showing search results and
NOT
count the cells that appear blank and only contain the formula.

Thanks!!!


 




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 06:14 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.