Nested If using TODAY

Poolshark25

New Member
Joined
Jan 3, 2019
Messages
31
Hi all,

I'm struggling with setting up a sheet to warn me when a date is within 7 days of approaching todays date. All the research i seem to be doing is not quite working for me.

In columns A and B i have 2 dates (A start date in A and an end date in B)

I need to write an IF statement that will return 4 different results as text as follows:-

A: If the end date is more than 7 days prior to todays date (I.E 10 days before todays date) i want to return "Overdue"
B: If the end date is within 7 days of todays date i want to return "Check"
C: If the end date is later than todays date i want to return "OK"
D: If the cells do not have a date in them return ""

Simplified i want to be warned to 'check something' if it is within 7 days of expiring. If it is not ready for expiring yet (More than 7 days left to run on it return "OK". If it has expired to return "Overdue". If the date cells are not populated to return "".

I hope this makes sense and any help with this would be greatly appreciated.

My formula that is not quite working is as follows: =IF(C5=(TODAY))+7,"Check" but that only returns "Check when it is exactly 7 days prior to today, i want it to return "check if it is either 7,6,5,4,3,2, or 1 day prior to todays date. I would then also need to get the the other 3 bits working

Ernie
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
How about
Excel Formula:
=IF(C5="","",IF(C5<TODAY()-7,"Overdue",IF(C5<=TODAY(),"Check","Ok")))
 
Upvote 0
How about
Excel Formula:
=IF(C5="","",IF(C5<TODAY()-7,"Overdue",IF(C5<=TODAY(),"Check","Ok")))
Hi Fluff, thanks for the message.

I couldn't get this to work properly.

I have found a formula that works great for the most part but is just missing one piece. I have attached my sheet which shows what i'm trying to achieve and i now just need this adapting slightly so that it returns a blank cell when there are no dates in the cells rather than returning 'Expired' in column D on the Strimmers row. I have many cells which are not yet populated with dates so this is a bit confusing when scanning the sheets looking for expired dates.

Here is my current formula that needs adapting:

=IF(TODAY()>C4,"Expired",IF((C4-TODAY())<=7,"Retrain","Valid"))

If you are able to help with this i would be grateful.

Ernie
 

Attachments

  • Excel Example.png
    Excel Example.png
    31.3 KB · Views: 9
Upvote 0
Hi

I'm not sure i'm explaining what i actually need or maybe i'm approaching it the wrong way.

If todays date is 11/03/2022 and an expiry date is between 05/03/2022 and Todays date (7 days) i want to be warned with 'Check' as it is within a week of expiring

If todays date is 11/03/2022 and an expiry date is earlier than 05/03/2022 (More than 7 days before todays date) i want to return 'Ok' as there is still more than a week before it expires

If the expiry date has surpassed todays date then i want to return 'Overdo'

I will then do conditional formatting to do a 'Traffic Light' system to show the 'Ok' return in GREEN as it is still ok
'Check' in AMBER as it is in danger of expiring soon
'Overdue' in RED as it needs urgent attention

I am ok with the conditional formatting once i get the formula working how i need it
 
Upvote 0
Ok, how about
+Fluff 1.xlsm
CD
1
2
3
4
510/03/2022Overdue
616/03/2022Check
719/03/2022Ok
8 
Data
Cell Formulas
RangeFormula
D5:D8D5=IF(C5="","",IF(C5<TODAY(),"Overdue",IF(C5<=TODAY()+7,"Check","Ok")))
 
Upvote 0
Solution
Hi. Thank you for that. I have logged off for the weekend now so I’ll give it a go on Monday. Have a nice weekend. Ernie
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,795
Members
449,048
Latest member
greyangel23

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