Having issues with Year formulas

I have tried several year formulas, none of which I have found to be accurate. I have tried dividing the days by 365 and using rounding but the rounding doesn't work for half of the year. The current solution I'm working with works except when the year advances. If I have a start date of 6/1/2024 and a completion date of 2/5/2025 the formulas shows 1 yr and when I add the months and day formulas it will show 1Y 8M 4D. The correct answer I would expect is 8M 4D. I am using an IF statement to not show the Year when the year is below 1. The operators I've tried are <> 0, >1, = > 1.
I'm not stuck on this formula so if there is a better way to get accurate year count that can work within a year and span multiple years, I'm all for it.

Here are a couple of my year formulas I've tried.

=(IF(YEAR([Date Completed]243) - YEAR(Age243) > 1, YEAR([Date Completed]243) - YEAR(Age243) + " Y ", IF(YEAR([Date Completed]243) - YEAR(Age243), YEAR([Date Completed]243) - YEAR(Age243) + " Y ", "")))

=IF(YEAR([Date Completed]243) - YEAR([date]243) >= 1, YEAR([Date Completed]243) - YEAR([date]243), "")

Here's examples of the dates used for testing.

2/5/2024 to 1/1/2026 shows 2 years. Should show 1 year.

2/5/2024 to 12/20/2024 shows 0 years as it should.

Here is the rest of my date formula when added to the year provides Month and Day counts.

+ IF(MONTH([Date Completed]243) - MONTH([Start Date]8) < 0, 12 + MONTH([Date Completed]243) - MONTH([Start Date]8), MONTH([Date Completed]243) - MONTH([Start Date]8)) + " M " + IF(DAY([Date Completed]243) - DAY([Start Date]8) < 0, 30 + DAY([Date Completed]243) - DAY([Start Date]8), DAY([Date Completed]243) - DAY([Start Date]8) + " D "

Thank you in advance for your assistance.

Best Answers

Answers

Help Article Resources

Want to practice working with formulas directly in Smartsheet?

Check out the Formula Handbook template!