Is there a formula to count multiple items in the same column?
Hi! I am trying to create a sheet summary that counts multiple items in one column. for example: =COUNTIFS([policy_name]:[policy_name], "package B", [policy_name]:[policy_name], "Package C") but it gives me 0. Is there a way to count multiple items within the same column?
Best Answers
-
Do you want a count of all cells that contain Package B and Package C within the same cell?
=COUNTIFS([policy_name]:[policy_name], AND(CONTAINS("Package B", @cell), CONTAINS("Package C", @cell)))
-
Hi Chantelle,
Try something like this.
=COUNTIF(Policy:Policy; OR(CONTAINS("Package B"; @cell); CONTAINS("Package C"; @cell)))
The same version but with the below changes for your and others convenience.
=COUNTIF(Policy:Policy, OR(CONTAINS("Package B", @cell), CONTAINS("Package C", @cell)))
Depending on your country you’ll need to exchange the comma to a period and the semi-colon to a comma.
Did that work?
I hope that helps!
Be safe and have a fantastic weekend!
Best,
Andrée Starå
Workflow Consultant / CEO @ WORK BOLD
✅Did my post help or answer your question or solve your problem? Please help the Community by marking it as the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Answers
-
Do you want a count of all cells that contain Package B and Package C within the same cell?
=COUNTIFS([policy_name]:[policy_name], AND(CONTAINS("Package B", @cell), CONTAINS("Package C", @cell)))
-
The Packace types aren't in the same cell, just in the same column. I want a total count of all instances of Package B, C, D and E within the Policy column. I'll attach a screenshot. Also, I changed the name of the column to Policy, instead of 'policy_name'.
-
Hi Chantelle,
Try something like this.
=COUNTIF(Policy:Policy; OR(CONTAINS("Package B"; @cell); CONTAINS("Package C"; @cell)))
The same version but with the below changes for your and others convenience.
=COUNTIF(Policy:Policy, OR(CONTAINS("Package B", @cell), CONTAINS("Package C", @cell)))
Depending on your country you’ll need to exchange the comma to a period and the semi-colon to a comma.
Did that work?
I hope that helps!
Be safe and have a fantastic weekend!
Best,
Andrée Starå
Workflow Consultant / CEO @ WORK BOLD
✅Did my post help or answer your question or solve your problem? Please help the Community by marking it as the accepted answer/helpful. It will make it easier for others to find a solution or help to answer!
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Andree is correct. You would use the same pattern I provided except use an OR instead of an AND.
-
Thank you both for your help! That worked :)
-
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
-
Happy to help. 👍️
-
I was searching and searching for this option; and found your response/post and boom .. it worked like a charm! Thank you, so much!👊
-
SMARTSHEET EXPERT CONSULTANT & PARTNER
Andrée Starå | Workflow Consultant / CEO @ WORK BOLD
W: www.workbold.com | E:andree@workbold.com | P: +46 (0) - 72 - 510 99 35
Feel free to contact me for help with Smartsheet, integrations, general workflow advice, or anything else.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 64.9K Get Help
- 441 Global Discussions
- 140 Industry Talk
- 472 Announcements
- 4.9K Ideas & Feature Requests
- 129 Brandfolder
- 148 Just for fun
- 68 Community Job Board
- 497 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 300 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!