# If then, date + 15yrs

#### Alphazulu

##### Board Regular
I'm trying to put together an formula (if/then?) that will do the following

Formula to be placed in Cell N3
If E3 = "Initial File"
Then return the date in cell L3 + 15 years

Thanks again -

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

#### texasalynn

##### Well-known Member
try this

=IF(E3="Initial File",EDATE(L3,180),"")

#### VoG

##### Legend
Try

=IF(E3="Initial File",DATE(YEAR(L3)+15,MONTH(L3),DAY(L3)),"")

#### Alphazulu

##### Board Regular
=IF(E3="Initial File",DATE(YEAR(L3)+15,MONTH(L3),DAY(L3)),"")

This worked perfectly! Can it do the same thing for multiple selections? For example, if Initial File or Original File, Final File, Old File, Missing File is in Cell E3 return L3+15yrs.

Or could I point the formula at a list of options that should return the L3 date + 15yrs result?

#### VoG

##### Legend
Try

=IF(OR(E3={"Initial File","Original File","Final File","Old File","Missing File"}),DATE(YEAR(L3)+15,MONTH(L3),DAY(L3)),"")

#### Alphazulu

##### Board Regular
The exciting part is that I can see this working and am getting closer to making my life a lot easier thanks to your help.

Unfortunately, I keep finding new questions with every small win.

Now I need leave the cell blank if none of the matches (Initial File","Original File","Final File","Old File","Missing File) are found.

Thank you very much for all of your help

#### VoG

##### Legend
Now I need leave the cell blank if none of the matches (Initial File","Original File","Final File","Old File","Missing File) are found.

Um - it does. Try entering "New File" in E3 - the date in N3 should disappear.

#### Alphazulu

##### Board Regular
aha.

How about if no date is entered into L3 to return blank. It currently returns 12/31/1914?

#### VoG

##### Legend
Try

=IF(L3="","",IF(OR(E3={"Initial File","Original File","Final File","Old File","Missing File"}),DATE(YEAR(L3)+15,MONTH(L3),DAY(L3)),""))

#### Alphazulu

##### Board Regular
That did it!

Thank again and have a good weeken

Replies
9
Views
141
Replies
1
Views
141
Replies
7
Views
82
Replies
8
Views
58
Replies
3
Views
113

1,191,576
Messages
5,987,390
Members
440,095
Latest member
yanaungmyint

### 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.

### Which adblocker are you using?

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

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