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.
Count specific list items in child
I have a list of reports being sent to specific users as seen here:
Location 1
- User 1 xxxxxx
-- Report 1 Monday
-- Report 2 Thursday
-- Report 3 Daily
In the "xxxxxxx" cell, I'd like something like this: M:2 T:0 W:0 T:2 F:0
to let me know at a glance how many reports someone is getting on daily basis. I can't spread the sheet out to use check boxes, it all needs to be in 1 cell. Is there a way to add just each instance of Monday and Daily, and use a concatenate formula to put it together as seen?
Comments
-
This can be done using COUNTIF and concatenate functions.
Here is the formula. If XXXXXX is located in a parent row and Report 1, Report 2, etc are child rows, you can copy and paste this exact formula to your sheet. If you are not using hierarchies, you will need to replace all the CHILDREN() functions with cell ranges.
This formula counts the number of time each day appears + if daily appears, adds them together and concatenates it with text.
="M:" + (COUNTIF(CHILDREN(), "Monday") + (COUNTIF(CHILDREN(), "Daily"))) + " T:" + (COUNTIF(CHILDREN(), "Tuesday") + (COUNTIF(CHILDREN(), "Daily"))) + " W:" + (COUNTIF(CHILDREN(), "Wednesday") + (COUNTIF(CHILDREN(), "Daily"))) + " T:" + (COUNTIF(CHILDREN(), "Thursday") + (COUNTIF(CHILDREN(), "Daily"))) + " F:" + (COUNTIF(CHILDREN(), "Friday") + (COUNTIF(CHILDREN(), "Daily")))
The result is (using your example): M:2 T:1 W:1 T:2 F:1
Learn more about formulas in Smartsheet through our Help Center page: http://help.smartsheet.com/customer/portal/articles/775363-using-formulas
-
Oh, wow, that's perfect! Thanks a lot!
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.8K Get Help
- 437 Global Discussions
- 138 Industry Talk
- 470 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 65 Community Job Board
- 486 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives