#### 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 Help

Options
edited 12/09/19

This might be simple, but I can't figure out a good formula for dates.

What I have is a column with dates, and another column (Year) next to it that is hopefully an If statement.

Something like IF the date is in 2015 THEN put a 15. I need this column so I can reference this Year column when calculating total investments made in each year.

Hopefully this makes sense and someone can help!

Thanks

Tags:

• ✭✭✭✭✭✭
Options

=right(*select Cell*,2) will return 15 on a cell or date with 2015 as the year.

if you drop that down it will post the last 2 digits of the year for every cell

• ✭✭✭✭✭✭
Options

if you only want it to post if the year is 2015 then you can use the if statement.

=if(year(*select cell*)=2015, right(*select same cell*,2))

• Options

Thank you! Thank you!

This is exactly what I needed!

• ✭✭✭✭✭✭
Options

If you want to show the last two of ANY year, not just 2015 then try this:

=IF(ISDATE(YEAR(cell-ref), YEAR(cell-ref) - 2000)

or if you are sure it has a date then

=YEAR(cell-ref) - 2000

assuming you don't have any dates before the 21st century (or after)

Craig

This discussion has been closed.