Welcome to the Smartsheet Forum Archives


The posts in this forum are no longer monitored for accuracy and their content may no longer be current. If there's a discussion here that interests you and you'd like to find (or create) a more current version, please Visit the Current Forums.

Formula Syntax Help

Options

 

 

Hello,

 

I am creating a sheet to track calibrations for the equipment in our department. I saw the function to add months to a date from another cell

 

https://community.smartsheet.com/discussion/smartsheet-formula-syntax-help

 

=IF((MONTH([Purchase Date]1) + 9) > 12, DATE(YEAR([Purchase Date]1) + 1, MONTH([Purchase Date]1) + 9 - 12, DAY([Purchase Date]1)), DATE(YEAR([Purchase Date]1), MONTH([Purchase Date]1) + 9, DAY([Purchase Date]1)))

 

I want to subtract 2 months rather than add them to the date in the Calibration Due column. When I entered the function into the Calibration Reminder cell it worked to subtract 2 months, but when the value has to change over the year ( EX: 2017 to 2016) it returned with #INVALID VALUE and I am not sure what is wrong. I was hoping someone would check my function and see where my error is. The function I used is below and I have attached a screen shot for reference.

 

=IF((MONTH([Calibration Due]24) + -2) > 12, DATE(YEAR([Calibration Due]24) + 1, MONTH([Calibration Due]24) + -2 - 12, DAY([Calibration Due]24)), DATE(YEAR([Calibration Due]24), MONTH([Calibration Due]24) + -2, DAY([Calibration Due]24)))

 

Thank you,

 

Morgan


Capture.JPG

Comments

This discussion has been closed.