Formula to show months

Hazeyt

New Member
Joined
Jan 23, 2023
Messages
29
Office Version
  1. 365
Please can anyone help with a formula?

I have a list of Valid Until dates for mandatory work courses.

I want the formula to show if the valid until date is a month away from today's date then put "1 month" in column, if 2 months, then show "2 months", any months over 2 months then, show "> 3 months".

Thanks
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
If it is 15 days away, should it return a 1?

Let's say the date is in cell A1. Then you could use a formula like:
Excel Formula:
=IF(TODAY()-A1>60,">3 months",IF(TODAY()-A1>30,"2 months",IF(TODAY()-A1>0,"1 month","")))
Note I am returning:
- "3 months" for greater than 60 days
- "2 months" for greater than 30 days
- "1 month" for greater than 0 days

Adjust the formula to suit your needs.
 
Upvote 0
Solution
If it is 15 days away, should it return a 1?

Let's say the date is in cell A1. Then you could use a formula like:
Excel Formula:
=IF(TODAY()-A1>60,">3 months",IF(TODAY()-A1>30,"2 months",IF(TODAY()-A1>0,"1 month","")))
Note I am returning:
- "3 months" for greater than 60 days
- "2 months" for greater than 30 days
- "1 month" for greater than 0 days

Adjust the formula to suit your needs.
Thank you
 
Upvote 0
You are welcome.
Glad I was able to help!
 
Upvote 0

Forum statistics

Threads
1,215,214
Messages
6,123,659
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