Not count "Blank cells"

gspot

New Member
Joined
May 3, 2007
Messages
19
Hi!
I have this formula applied to a column:
=TEXT((IF((NOT(ISBLANK(D5)));(IF((COUNTIF(D:D; A5))=1;"";"Tratadas"));""));"")

Excel will count all the cells with formulas, including those that look empty, are there any way to change that? I dont wont to count the blank cells...


Thanks
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi,

Try:

=TEXT((IF((D5 < > ""),(IF((COUNTIF(D1:D12, A5))=1,"","Tratadas")),"")),"")

D5 wont be truely blank if you have a formula that sets the value to "", it may look blank but Excel thinks it's not ;-)

Change ,'s to ;'s
 
Upvote 0
Hi!
I have this formula applied to a column:
=TEXT((IF((NOT(ISBLANK(D5)));(IF((COUNTIF(D:D; A5))=1;"";"Tratadas"));""));"")

Excel will count all the cells with formulas, including those that look empty, are there any way to change that? I dont wont to count the blank cells...


Thanks
Can't see why you're using the TEXT(...) function.

Maybe this...

=IF(AND(D5<>"";COUNTIF(D:D;A5)=1);"";"Tratadas")
 
Upvote 0
Can't see why you're using the TEXT(...) function.

Maybe this...

=IF(AND(D5<>"";COUNTIF(D:D;A5)=1);"";"Tratadas")

Your correct, the TEXT function doesn’t do anything it was a “experiment”… the correct function is without TEXT:
IF((NOT(ISBLANK(D2)));(IF((COUNTIF(D:D; A2))=1;"";"Tratadas"));"")
I have tried changing to D5<>"" and the function works but still counts the blank cells :-(


thanks for the replies
 
Upvote 0
Your correct, the TEXT function doesn’t do anything it was a “experiment”… the correct function is without TEXT:
IF((NOT(ISBLANK(D2)));(IF((COUNTIF(D:D; A2))=1;"";"Tratadas"));"")
I have tried changing to D5<>"" and the function works but still counts the blank cells :-(


thanks for the replies
Are you saying that this portion of the formula counts blank cells:

COUNTIF(D:D;A2)

What's in A2?
 
Upvote 0
Are you saying that this portion of the formula counts blank cells:

COUNTIF(D:D;A2)

What's in A2?

The countif works fine, the result of my formula:IF((NOT(ISBLANK(D2)));(IF((COUNTIF(D:D; A2))=1;"";"Tratadas"));"") Is the problem, some cells appear blank but Excel assumes as having something....
 
Upvote 0
If these cells are supposed to be blank, you may need to filter your table for blanks, select the column, then clear contents. Then the blanks should be seen correctly by Excel.
 
Upvote 0
The countif works fine, the result of my formula:IF((NOT(ISBLANK(D2)));(IF((COUNTIF(D:D; A2))=1;"";"Tratadas"));"") Is the problem, some cells appear blank but Excel assumes as having something....
OK, now I understand...

Well, that's just how Excel works.

If a cell contains a formula then that cell is not blank even if the formula returns the empty text string "".

If you need to count cells that contain TEXT but exclude cells with formula blanks try this:

=COUNTIF(range;"?*")
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top