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.
Is there a way to use cell references in an IF() statement?
I know you can use cell references in the "logical_test" clause but is there a way to use them in the "value_if_true" and "value_if_false" clauses? Al the examples of IF() statements have just text strings for what the IF() statement resolves to. I'd like it to resolve to the value in another cell.
For example: =IF(Checkbox = 1, first, second)
Where first and second are cells in the same row.
Comments
-
Yes you can.
Example:
=IF([Checkbox]2 = 1, [Column1]2, [Column2]2)
This says if the checkbox is checked in row 2 column checkbox, then return column1 row 2 value
-
Thanks for the replies. I first tried Ian's solution before I posted and couldn't figure out why I was getting an "UNPARSEABLE" error in the cell. I played around a bit until I found that parentheses around the first clause worked:
=IF(([Checkbox]2 = 1), [Column1]2, [Column2]2)
In the spirit of giving back to the community, I am essentuially implementing a timestamp to record when a checkbox gets checked:
=IF((Checkbox2 = 1), TODAY(), "")
-
Hi Tom - The formula you created would show ‘todays’ date when the checkbox was checked. However, ‘todays’ date will change each day to match the current date. If the checkbox is the LAST item that is edited in the cell, you could insert a Modified (Date) System column which will show a timestamp of the last time that row was modified. You can also view the history of the cell to see when the box was checked by right clicking in the cell and selecting View History.
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 139 Industry Talk
- 471 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 495 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives