IF statement to ignore "NULL"

Shales

Board Regular
Joined
Aug 8, 2006
Messages
171
Office Version
  1. 365
Platform
  1. Windows
Hi guys,

Another very simply formula I am sure....

I have this;

=IF(V2>$AJ$2,"Yes","No") AJ2 contains a static date

My problem is in column V, I have both dates (DD/MM/YYY) and NULL. My formula is currently returning "YES" when there is a NULL in column V.

How can the formula ignore NULL ?

Thank you.
Gavin
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Was being silly guys. I worked it out.

=IF(AND(V2<>"NULL",V2>$AJ$2),"Yes","No")
 
Upvote 0
Do you mean the text "NULL" or a blank cell?

=ISBLANK() will return FALSE for a cell that contains a formula that returns "", so I tend to use =IF(LEN(V2)>0,

So for yours:

Code:
=IF(AND(LEN(V2)>0,V2>$AJ$2),"Yes","No")

This will return a "No" if the cell is blank. If you want to return a blank:

Code:
=IF(LEN(V2)=0,"",IF(V2>$AJ$2,"Yes","No"))

Edit: I'm glad you worked it out. I thought you meant a blank cell rather than the text "NULL", oops :)

Hope that helps

Mackers
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,717
Members
448,985
Latest member
chocbudda

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