Excel Query- IF formula

rache47

New Member
Joined
Apr 29, 2024
Messages
2
Office Version
  1. 2010
Platform
  1. Windows
Hi, If I have a Date in Column O I want it to return a Yes if there is no date in Column O I want it to return a No- what's the best IF formula to use please, Thanks for your help.
I tried this one =IF(ISNUMBER(O4),"YES", IF(O4="","","NO")) but it returned all Yes
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Welcome to the Board!

If it is a valid date, this should work:
Excel Formula:
=IF(O4>0,"YES","NO")
 
Upvote 0
Actually, borrowing the concept from your original one appears to work best:
Excel Formula:
=IF(ISNUMBER(O4),"YES","NO")
as my original one would return "Yes" for a text entry, while Scott's returns a #VALUE error for text entries.
The formula above will return "NO" for text entries.
 
Upvote 0
Apologies in advance for the silly question, what is the logical test here for the IF statement to return "Yes" ?
IF evaluates a TRUE/FALSE expression. Any non-zero number (in this case a date) evaluates to TRUE, and Zero, which a competely blank cell evaluates to, to FALSE.

4/1/2024​
YES
NO
 
Upvote 0
Thank you Scott, (I had always thought the logical expression needed an instruction as such ie >)
 
Last edited:
Upvote 0
IF evaluates a TRUE/FALSE expression. Any non-zero number (in this case a date) evaluates to TRUE, and Zero, which a competely blank cell evaluates to, to FALSE.

4/1/2024​
YES
NO
Just be aware that it results in a #VALUE error for any text entry.
 
Upvote 0

Forum statistics

Threads
1,216,177
Messages
6,129,323
Members
449,501
Latest member
Amriddin

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