IF cell contains date, ten return "yes" in another cell.

MWhiteDesigns

Well-known Member
Joined
Nov 17, 2010
Messages
646
Office Version
  1. 2016
Platform
  1. Windows
I know this is an If statement, however how do you indicate the date?
If O3 contains date, then Yes in B3.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Do you want to determine whether a valid date has actually been entered into the cell or just whther the cell contains a value that could represent a valid Excel date (eg the decimal 42000.00)?

I do not believe you can explicitly do the former without a UDF (although using an XLM4 macroi function may also be a possibility).
 
Upvote 0
no need to determine if cell contains a valid date, as the cells are data validated to contain a date only.

What about, if there is any value in O3, then enter "Yes" in B3
If there is no value in O3, then enter "No" in B3
 
Upvote 0
Well, given you have validation applied:

=IF(ISNUMBER(O3),"Yes","No")

any value:

=IF(O3<>"","Yes","No")
 
Upvote 0
Well, given you have validation applied:

=IF(ISNUMBER(O3),"Yes","No")

any value:

=IF(O3<>"","Yes","No")


This worked, however there is a small issue. If there is nothing in the row at all, it still returns No. If there is no entry in the row, i would like for the cell to stay blank.

There will always be a value in Column F if there is an entry.
 
Last edited:
Upvote 0
Try a nested if statement for the false logic test....


=IF(ISNUMBER(O3),"Yes",IF(O3="","","No")) Something like that should work.

If O3 has a number (True) then a Yes will be returned. If no then you have a nested if Statement: that if the cell is blank (Nested Logical test) then if true you return a blank and if false you return a No.

Hope that makes sense but the formula should work.

(Here is the other formula with the nested IF statement as well.)

=IF(O3<>"","Yes",IF(O3="","","No"))
 
Upvote 0
Try a nested if statement for the false logic test....


=IF(ISNUMBER(O3),"Yes",IF(O3="","","No")) Something like that should work.

If O3 has a number (True) then a Yes will be returned. If no then you have a nested if Statement: that if the cell is blank (Nested Logical test) then if true you return a blank and if false you return a No.

Hope that makes sense but the formula should work.

(Here is the other formula with the nested IF statement as well.)

=IF(O3<>"","Yes",IF(O3="","","No"))

First formula doesn't work the way i need it to. It returns nothing in the cell when there is not a date in O3.

I only want it to return nothing if there is nothing in the row at all. Otherwise if there is an entry in the row, and O3 does not have a date, then it returns "No". Does that make sense?
 
Upvote 0
Do you have other formulas in this row you need to check for 'emptyness' that will be returning a blank (ie "")? What is the extent of the row you need to check eg A:O?
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,665
Members
449,114
Latest member
aides

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