I would like to add two years to any date!
Hi, I would like to add two years to the date from another column?
Any suggestions
Thanks!
Best Answer
-
Make sure the column type is 'Date' for the column where you are placing the formula.
Answers
-
Try something like this...
=DATE(YEAR([Date Column]@row) + 2, MONTH([Date Column]@row, DAY([Date Column]@row))
-
=DATE(YEAR([ED]@ROW) + 2, MONTH(([ED]@ROW), DAY([ED]@ROW)))
i USED THE ABOVE FORMULA AND IT SAYS THAT "UNPARSABLE"
-
You have an extra set of parenthesis. Remove one from after MONTH and one from the end.
@row is also case sensitive. It has to be lower case.
=DATE(YEAR([ED]@row) + 2, MONTH(([ED]@row), DAY([ED]@row))
-
=DATE(YEAR([ED]@row3) + 2, MONTH([ED]@row3), DAY([ED]@row3)), it still says unparsable.
Does the date column has to be any particular format. It's YYYY-MM-DD.
-
You would use either an actual row number OR @row. @row just tells the formula to look at the specified column for whatever row the formula is on. It is more efficient on the back-end and helps avoid accidentally entering an incorrect row number.
Try this exactly as is...
=DATE(YEAR([ED]@row) + 2, MONTH([ED]@row), DAY([ED]@row))
-
It says #INVALID COLUMN VALUE
-
Make sure the column type is 'Date' for the column where you are placing the formula.
-
Thank you very much.
-
This is a great option! Is there a way to alter the formula to update the date when a box is checked?
-
You can do this with a little trickery and a helper column.
Create a helper column called something like DatePlusTwoYears, and populate it using the formula from above.
In the column that you want to be able to toggle the date, use an IF statement:
=IF(CheckboxColumn@row = 1, DatePlusTwoYears@row, RegularDateColumn@row)
Regards,
Jeff Reisman
Link: Smartsheet Functions Help Pages Link: Smartsheet Formula Error Messages
If my answer helped solve your issue, please mark it as accepted so that other users can find it later. Thanks!
-
thank you @Jeff Reisman . I tried it but it gave me a #CIRCULAR REFERANCE error. I was able to get it to work if I added a second helper column and added the formula to it.
-
@damon.tackett You should be able to do away with the helper column if you use:
=IFERROR(DATE(YEAR([Original Date]@row) + IF(Checkbox@row = 1, 2, 0), MONTH([Original Date]@row), DAY([Original Date]@row)), "")
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 496 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!