# Using DATE and IF

Closed
Justinm Posts 1 Registration date Tuesday May 13, 2014 Status Member Last seen May 13, 2014 - May 13, 2014 at 12:01 PM
Blocked Profile - May 13, 2014 at 12:29 PM
=IF(B3="",09-01-2014,)*DATE(YEAR(B3)+G3,MONTH(B3),DAY(B3))

This is my failed furmula. I am trying to write a formula that will take the date in B3 and add 5 years. However if no date is entered in B3 i would like it to display 09-01-2014. Everything after the asteric is functioning. Any input would be greatly appreciated.

Cheers,

## 1 response

Blocked Profile
May 13, 2014 at 12:19 PM
Well, this is a real klugy way, but it works:
=IF(B3="","9/1/2014",B3+1825)

5X365=1825

Just formate the cell this formula is in into a date.

I know it is ugly!
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
May 13, 2014 at 12:27 PM
What an ugliness haha, I can't stand it haha.

A year always has 12 months but not always 365 days so replace the ugly part "B3+1825" by EDATE(B3,60)

Pretty :)
Blocked Profile
May 13, 2014 at 12:29 PM
I knew you would make it pretty! Thank you!