How do I Add or subtract months or years from a date in Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Trying to add and subtract years and ormonths to dates and concidering leap
years.
=IF(IF(D2>5,B2-365,IF(D2<3,B2-365,IF(C2/4=INT(C2/4),B2-363,B2-364)))<NOW(),NOW(),IF(C2>5,B2-365,IF(C2<3,B2-365,IF(C2/4=INT(C2/4),B2-363,B2-364))))
is too cryptic!
 
Hi Dug,

Seems you're not using real Excel dates. You should, absolutely!
It looks like D2 is your month, C2 is the year and B2 is the day. Adjust if
I'm wrong.
In E2, put: =date(C2,D2,B2)

To add a year:
=Date(year(E2)+1,month(E2),day(E2))

etc

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top