If Date Formula

AlexKimball81

New Member
Joined
Dec 17, 2018
Messages
3
Hi,
I am trying to find a formula that if the date in cell A4 is within a year of the date in cell f1, it will do one formula, if it is between 1 and 2 years it will do another. Any input will be greatly appreciated.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hey, try this formula:
=IF(ABS(F1-A4)<=365,"Formula1","Formula2")
Where Formula1 and Formula2 are replaced by your designated formulae.
 
Upvote 0
=IF(ABS(F1-A4)<=365,"Formula1","Formula2")
Just note that will do Formula2 for any date greater than one year. If they truly want Formula2 only if it is between 1 and 2 years, you will need to nest another level of IF in there.
if it is between 1 and 2 years it will do another.
Something like:
Code:
[COLOR=#333333]=IF(ABS(F1-A4)<=365,"Formula1",IF(ABS(F1-A4)<=730,"Formula2",""))[/COLOR]
 
Last edited:
Upvote 0
You're right Joe, I only omitted nesting the function as there was no criteria in the original posting about a 3rd scenario, but of course then like you say, nesting another layer would be required!
I appreciate the pointer though.
 
Upvote 0

Forum statistics

Threads
1,224,749
Messages
6,180,725
Members
452,995
Latest member
isldboy

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