COUNTA for a cell with a formula

S

Steve Jackson

I have tried setting a COUNTA formula on an array. The cells in the array
all have a similar formula in each one and will contain text if a specific
condition is met in another set of cells. The problem I am getting is that
when I put in the formula =COUNTA(A1,B1,C1), I get the result of all of them
not being empty. Is this because all those cells contain formulas, even if
text is there or not. If so, is there a similar function to COUNTA that will
count cells and not take into account that a formula is already in the cell?

Any help will be appreciated.

Steve
 
P

Peo Sjoblom

What is it that you want to count, text or numbers?

if text but not cells with formulas that return blank ""

=SUMPRODUCT(--(ISTEXT(A1:A10)),--(LEN(A1:A10)>0))

if numbers

=COUNT(A1:A10)

if both numbers and text but not blanks from formulas

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


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com
 
P

Peo Sjoblom

countblank takes only a range but since A1,B1,C1 can be used as A1:C1 then
maybe

=COUNTA(A1:C1)-COUNTBLANK(A1:C1)

but that won't work if there is a truly blank cell


--

Regards,

Peo Sjoblom

http://nwexcelsolutions.com
 
S

Steve Jackson

Thanks for all your help. The data I have is a selection of cells and not a
direct array so I had to go for:

=COUNTA(A1,E1,G1)-COUNTBLANK(A1)-COUNTBLANK(E1)-COUNTBLANK(G1)

Its not exactly pretty but it works because all cells A1,E1,G1 start off
blank (with just formulas in them) and as data is inputted in other cells,
cells A1, E1, G1 are automatically populated with specific data via their
formulas.
 

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

Similar Threads

SUMIF with criteria "<>" & "=" 4
COUNTA Function 6
Counta function 3
count nonblank cells 3
COUNTA counting formulas as well. 2
Text Formula Error 1
Indirect and Sheet Name 4
Modify a Formula 2

Top