How to ignore blank cells with formula!

alinpion

Board Regular
Joined
Jul 12, 2011
Messages
79
Hello!

In cell C1 I hace A1-B1 and in cell DI want to display the status of the cell C1 like this :
=IF(C1<>0 ; "NOT OK" ; "OK")
This means that when the value of the cell C1 is different then 0 cell D1 will display "NOT OK" and if the value of cell c1 is 0 then D1 will display "OK".

The PROBLEM:
Because the cell C1 contains a formula (A1-B1) the D1 cell will display "NOT OK" even if the cell C1 doesn't show any number.
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Guessing a bit:

C1:
=IF(COUNT(A1:B1)=2,A1-B1,"")

D1:
=IF(C1="","",IF(C1<>0, "NOT OK", "OK"))
 
Upvote 0
How can C1 not show a number? What value is in C1 if not a number - is it an error value?

Cell C1 contains A1-B1
If A1 and B1 are blank then C1 doesn't show any number
If C1 doesn't show any number (keep in mind that C1 contains a formula) D1 will display "NOT OK"

I need a formula for D1 that will ignore the formula in C1 but still compaire C1 with 0.
 
Upvote 0
Is that the actual formula you have in C1 or have you simplified it for purposes of the question? The reason I ask is that in all versions of Excel I have used, =A1-B1 will return 0 if A1 and B1 are blank.
 
Upvote 0
Is that the actual formula you have in C1 or have you simplified it for purposes of the question? The reason I ask is that in all versions of Excel I have used, =A1-B1 will return 0 if A1 and B1 are blank.

It is the simplified version ; my actual C cell formula is:

{=IF(AND(NOT(ISBLANK(A2));NOT(ISBLANK(November!B2))); A2-November!B2; "")}
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,570
Latest member
rik81h

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