IF statement, involving dates

dasbear3

New Member
Joined
Sep 12, 2008
Messages
22
I'm attempting to create a formula using dates where the outcome is determined on data within a cell..

27wzv4k.jpg


If the date within cell AF4 (and all cells within that column) takes place before 01/01/1987, "C" needs to populate in AG4. On 01/01/1987 and after, "F" should populate in cell AG4.

I attempted to use this formula, but to no avail:
=IF(AND(AF4>01/01/1987,AF4<01/01/1987)F,C)

  • Would it matter if the data in AF4 is blank?
  • Does this make a difference if the date is formatted as mm/dd/yy, mm/dd/yyyy.. etc?
Please advise if there's a step I'm missing, or just going about it the wrong way. Thank you!!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
=IF(AND(AF4>DATEVALUE("01/01/1987"),AF4 < DATEVALUE("01/01/1987")),"F","C")<DATEVALUE("01 p 1987?)),?f?,?c?)< 01>
 
Last edited:
Upvote 0
I was able to use this formula to get the data to populate:

=IF(AF4>DATEVALUE("01/01/1987"),"F","C")

However, if AF4 is blank, it still shows up with "C". I tried attaching an =ISBLANK(AF4),", to the beginning but there's an error. Any thoughts?
 
Upvote 0
I was able to use this formula to get the data to populate:

=IF(AF4>DATEVALUE("01/01/1987"),"F","C")

However, if AF4 is blank, it still shows up with "C". I tried attaching an =ISBLANK(AF4),", to the beginning but there's an error. Any thoughts?
Try:
=IF(AF4="","",IF(AF4>=DATEVALUE("01/01/1987"),"F","C"))
 
Upvote 0

Forum statistics

Threads
1,215,045
Messages
6,122,840
Members
449,096
Latest member
Erald

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