If statements using dates.

MikeyZ

Well-known Member
Joined
Mar 14, 2002
Messages
553
I am using this IF
=IF(P518<=TODAY(),"Late","")

I would likw to modify it so that any date which is 3 days prior to TODAY() will be flagged.
any suggestions?
 

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).
I did try that but the flag didn't work.

The flag would need to work so that anything covering the range from today -3, would flag.
Would the OR work to cover the range of 3 days?
 
Upvote 0
I tried to get cute, but this didn't work:

=IF(P518<=(TODAY():Today()-3),"Late","")

Logically it should have.
 
Upvote 0
This worked, unless there's a better way:

=IF(OR(P518=TODAY(),P518=TODAY()-1, P518=TODAY()-2),"Late","")
 
Upvote 0
I tried what I typed and it did work for me. Today()-3 so I can't say off-hand why that didn't work for you, but it sounds like you found a solution.
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,735
Members
452,939
Latest member
WCrawford

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