Formula for collecting headers of checkboxes
I need a formula to check column a , b and c and if their checkbox is checked to bring back the column column names (a, b, c) and separate them with comma. can anyone help?
Answers
-
Hello @mahmadi We need a little more clarification on your question here. In the columns, a, b and c, what exactly are you trying to check, is it a COUNT of the checked boxes you need, or a SUM accordingly we can use the formula to return the desired result.
If possible, can you attach a test screenshot?
Cheers,
Ipshita
Ipshita Mukherjee
-
Hi @Ipshita . I have three columns which are defined as textboxes. in column 4 I want to bring back the column header of the first three columns if the box is checked for them. eg if only columns A and C are checked for one row, i want it t bring back "A, C" which are the column headers. does this help?
-
Hi @mahmadi ,
I am not aware of a way to get the column names with a Smartsheet formula. I have come up with a solution that involves the use of helper columns and a hard-coded nested if.
Essentially, the 3 column checkboxes have values of 1, 5, and 10. These values are then summed and the value determines which columns are checked. Here is a screenshot.
helper1 =IF([Column1]@row = 1, 1)
helper2 =IF([Column2]@row = 1, 5)
helper3 =IF([Column3]@row = 1, 10)
Sum =SUM([helper1]@row, [helper2]@row, [helper3]@row)
Column Names =IF(Sum@row = 1, "Column1", IF(Sum@row = 5, "Column2", IF(Sum@row = 10, "Column3", IF(Sum@row = 6, "Column1, Column2", IF(Sum@row = 11, "Column1, Column3", IF(Sum@row = 15, "Column2, Column3", IF(Sum@row = 16, "Column1, Column2, Column3")))))))
Once working, hide the helper and sum columns.
Hope this helps,
Dave
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.1K Get Help
- 348 Global Discussions
- 199 Industry Talk
- 427 Announcements
- 4.4K Ideas & Feature Requests
- 133 Brandfolder
- 127 Just for fun
- 127 Community Job Board
- 455 Show & Tell
- 28 Member Spotlight
- 1 SmartStories
- 282 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!