If Condition Confusion

C

Christopher Naveen

Hi,

I used a if condition and whenever the condition is false i have given the
formula to return the values as blank (using "" without space). If i apply
the formula over the col wherever it is false it is showing as Blank but if I
use count formula the blank cells are also counted. I cant see any characters
in the cell but the count formula is still counting. Can you pls. help me
where i am wrong.

Thanks in advance
 
T

T. Valko

You should have posted the formula you're using.

If you used a COUNTA formula, then yes, this will count those cells because
they are not empty.

I guess you want to count all cells that aren't blank? What kind of data
does the IF formula return? Text? Numbers? Both?

This will count *text only* and exclude the blank cells:

=COUNTIF(A1:A10,"?*")

This will count both text and numbers and exclude the blank cells:

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

Christopher Naveen

Hi,

Thanks for the response. Here is the formula which i used
=IF($BC2="X",TODAY()-$CU2,""). If i paste the formula over the col. i can get
the true / false values. As per this formula if the condition is true it will
return some number and if the condition is false then it will return blank. I
understand that this blank cell has some values which is not visible because
if i use counta / countif it counts the blanks cells also. I think i have to
change some settings in excel. If i use text to columns - delimit - general
then it is perfectly working and the blanks cells are not counted. I hope you
understood the problem. Pls. let me know if you have any questions.

Thank you so much for you quick response.

-Christ.
 
T

T. Valko

=IF($BC2="X",TODAY()-$CU2,"")

That formula will return either a number or the empty TEXT string "".

If you want to count how many cells have numbers in them then:

=COUNT(A1:A10)

This will not count cells with the empty TEXT string.
 

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

Top