Feb 26 2020 12:15 PM
@arjsharm I guess it depends which year you are talking about. Some years have 364 days, some have 365 days. So, it will be either 365 + 22 or 364 + 22.
Feb 26 2020 12:15 PM
SolutionHello @arjsharm,
If "years", "months", and "days" are in the same cell such as "1 years 0 months 22 days" then that could be:
=SUM(365*LEFT(A1,FIND(" y",A1)-1),365/12*MID(A1,FIND("rs",A1)+3,FIND(" m",A1)-FIND("rs",A1)-3),--MID(A1,FIND("hs",A1)+3,FIND(" d",A1)-FIND("hs",A1)-3))&" days"
If "years", "months", and "days" are in the separate cells such as
Years | Months | Days |
1 | 0 | 22 |
Then that could be:
=A1*365+B1*365/12+C1&" days"
Feb 27 2020 05:04 AM
@Riny_van_Eekelen in my case the year is 365 days irrespective of leap year days
Feb 27 2020 05:11 AM
@PReagan Thanks for sharing the formula ! It worked!
Feb 26 2020 12:15 PM
SolutionHello @arjsharm,
If "years", "months", and "days" are in the same cell such as "1 years 0 months 22 days" then that could be:
=SUM(365*LEFT(A1,FIND(" y",A1)-1),365/12*MID(A1,FIND("rs",A1)+3,FIND(" m",A1)-FIND("rs",A1)-3),--MID(A1,FIND("hs",A1)+3,FIND(" d",A1)-FIND("hs",A1)-3))&" days"
If "years", "months", and "days" are in the separate cells such as
Years | Months | Days |
1 | 0 | 22 |
Then that could be:
=A1*365+B1*365/12+C1&" days"