Can I count rows that contain an option from a multi-select dropdown?
I have two tracker sheets: one for tax accounts, one for individuals that have POA authority. I want to be able to count the number of tax accounts that each POA is assigned to ONLY for accounts that have one of the tax types that they are approved for.
Is this possible?
Best Answers
-
You should be able to use COUNTIFS+HAS functions, HAS is very nice to use with multi-select as it looks for an exact string match, whereas CONTAINS will look for a match anywhere within a string.
=COUNTIFS([RANGE1]:[RANGE1], HAS(@cell, "value"), [RANGE2]:[RANGE2], HAS(@cell, "other value"))
Jason Tarpinian - Sevan Technology
Smartsheet Aligned Partner
-
You want to count if there are 2 matching values in the cell? This formula would count only if RANGE1 includes both "value1" and "value2"
=COUNTIFS([RANGE1]:[RANGE1], AND(HAS(@cell, "value1"), HAS(@cell, "value2")), [RANGE2]:[RANGE2], HAS(@cell, "other value"))
Jason Tarpinian - Sevan Technology
Smartsheet Aligned Partner
Answers
-
Hello Rach M,
Please provide more details, or write out what you would like with the actual column names. For example:
"Give me the # [Tax accounts], For each [POA], WHERE [Type of Permissions] EQUALS "Admin"
From what I can gather, is this what you are trying to do? Where is the Tax Accounts column? Do you expect an actual count (e.g. 1, 2, 3) or the actual Account names? -
Sure!
What I want it to do, is give me the value in the first spreadsheet in the "# Non-payroll Tax Accounts Assigned" column.
"Give me the number of tax accounts (rows) in spreadsheet 2 where the POA column in spreadsheet 2 matches the name of the POA in this row of spreadsheet 1 and where the tax type in spreadsheet 2 is one of the approved tax types listed in this row of spreadsheet 1."
I could list out each of the approved tax types in the column, but that would be 10 options and I'm hoping to make this more sustainable, so if I add a tax type, I don't have to change the formula. -
You should be able to use COUNTIFS+HAS functions, HAS is very nice to use with multi-select as it looks for an exact string match, whereas CONTAINS will look for a match anywhere within a string.
=COUNTIFS([RANGE1]:[RANGE1], HAS(@cell, "value"), [RANGE2]:[RANGE2], HAS(@cell, "other value"))
Jason Tarpinian - Sevan Technology
Smartsheet Aligned Partner
-
Thanks @Jason Tarpinian! Do you know if there's a way to select the "value" and "other value" from the multi-select dropdown? Or do I have to natively identify each option directly within the formula?
-
You want to count if there are 2 matching values in the cell? This formula would count only if RANGE1 includes both "value1" and "value2"
=COUNTIFS([RANGE1]:[RANGE1], AND(HAS(@cell, "value1"), HAS(@cell, "value2")), [RANGE2]:[RANGE2], HAS(@cell, "other value"))
Jason Tarpinian - Sevan Technology
Smartsheet Aligned Partner
-
Thank you @Jason Tarpinian!
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 422 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 143 Just for fun
- 59 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!