I'm stuck trying to do some basic arithmetic using the YEAR function
I'm trying to derive the number of years that have passed since a boat was either built or underwent a major refit. I have one column for date built and another for date of last refit. First, I wanted to return a blank if there is no last refit date, and then to calculate the number of years since the last refit if there is a date in the last refit column. Once that step has been accomplished, I want to do the same for the year built column.
So far, this unparseable formula is what I've come up with:
=IF([Last Refit]@row="","", SUM(YEAR(TODAY()-YEAR([Last Refit]@row))), IF([Year Built]@row"","", SUM(YEAR(TODAY()-YEAR([Year Built]@row)))))
I welcome your suggestions!
Answers
-
I think you might be doing too much based on your description. I'll just try to focus on the Last Refit. I think the formula you're looking for that provides a blank if there is no refit, but returns the number of years since the last refit if there is would be:
=IF(ISDATE([Last Refit]@row), YEAR(TODAY()) - YEAR([Last Refit]@row), "")
-
That worked. Now I just need to figure out how to extend the evaluation to the Year Built column. Thank you!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!