Skip to main content
less shouty title
Link
Journeyman Geek
  • 130.3k
  • 52
  • 272
  • 443

CONVERT MONTH DATES Convert month dates (WITH DECIMALSwith decimals) TO DAYS IN EXCELto days in Excel

Source Link

CONVERT MONTH DATES (WITH DECIMALS) TO DAYS IN EXCEL

Hello I have two dates, the initial one is in cell A1 (01/04/2024) and the final one in cell A2 (13/12/2024), I have looked for a formula that allows me to find the approximate number (A4) and the exact number (A5) of months between two dates.

A4=(YEAR(A2)-YEAR(A1))*12+(MONTH(A2)-MONTH(A1))+((DAY(A2)-DAY(A1)))/30

A4=YEARFRAC(A1,A2)

A5=(YEAR(A2)-YEAR(A1))*12+(MONTH(A2)-MONTH(A1))+(DAY(A2)/(DATE(YEAR(A2),MONTH(A2)+1,1)-DATE(YEAR(A2),MONTH(A2),1)))-((DAY(A1)-1)/(DATE(YEAR(A1),MONTH(A1)+1,1)-DATE(YEAR(A1),MONTH(A1),1)))

However I am trying to obtain a formula that allows me, from the months calculated between two dates, to know the exact number of days, that is, with the result obtained in cells A4 or A5, to calculate the number of days. One option I have considered is the function DAYS(A2,A1), but sometimes for the data I have, they only record the number of months with decimals (for example, 8.4 or 9.78), so I need to find the exact number of days from a number of months with decimals.

I would appreciate if you could help me with this query.