using date function, month shows as January when i type (12)

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

Guest

when date of birth is A1 and i use the formula
=date(year(A1)+19,month(12),day(31)), to get the last day of the year before
the 20th birthday, 31/1/1919 appears instead of 31/12/1919. why is this? if
i take the +19 away, the same thing happens. The only time it works is if i
specify the year instead of using another cell.
 
The reason your original formula did not work is because the MONTH()
and DAY() functions require serial date numbers (that is to say, an
Excel date equivalent expressed as a number).
 
=DATE(YEAR(A1)+19,12,31)

--

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

Similar Threads


Back
Top