Help with COUNTIFS
Hi Community!
I am hoping someone can help me figure out how to correct this formula or create a new one. I want to count how often the regional VP’s name appears in a row with a date within a specific date range (quarter). Current formula I am using in a calculation sheet and referencing another:
=COUNTIFS({TLH User Engagement Range 3}, "Sanchez", {TLH User Engagement Range 6}, AND(@cell >= DATE(2024, 1, 1), @cell <= DATE(2024, 3, 31)))
It is returning a count of 0 but there a 4 rows that should meet the criteria.
Thanks!
Best Answers
-
Fixed. The errors in the last cells of the Date Helper column have cleared. The Calculations sheet still reads 0 for Qtr.
-
Ok. So your formula is looking for an exact match on "Sanchez", but it looks more like you want to count rows where the cell contains "Sanchez" as part of a longer text string. In that case, try adjusting that criteria from
"Sanchez"
to
CONTAINS("Sanchez", @cell)
Answers
-
Are you able to provide a screenshot of the source data that should be getting counted?
-
Hopefully this helps!
-
That looks like text data to me. Try inserting a date type helper column and use this as a column formula (then reference the helper column as your date range in the COUNTIFS):
=DATE(VALUE(LEFT([User Last Access Date]@row, 4)), VALUE(MID([User Last Access Date]@row, 6, 2)), VALUE(MID([User Last Access Date]@row, 9, 2)))
-
Still returning 0.
-
Ok. Lets next try wrapping that whole DATE piece in an IFERROR.
=IFERROR(DATE(…………………), "")
-
Still '0". Hopefully, I entered the IFERROR correctly?
-
Sorry. I meant wrapping the DATE formula in the [DAte Helper] column in the IFERROR.
-
Ok. I am receiving #INCORRECT ARGUMENT SET
-
Looks like you just forgot that last part of the IFERROR that outputs a blank.
=IFERROR(DATE(…………………), "")
-
Fixed. The errors in the last cells of the Date Helper column have cleared. The Calculations sheet still reads 0 for Qtr.
-
Ok. So we should have the date part sorted. Next is the "Sanchez" part. Is {Range 3} visible in any of your screenshots already provided?
-
Yes. It is the column "Branch Path".
-
Ok. So your formula is looking for an exact match on "Sanchez", but it looks more like you want to count rows where the cell contains "Sanchez" as part of a longer text string. In that case, try adjusting that criteria from
"Sanchez"
to
CONTAINS("Sanchez", @cell)
-
That's it! It is working now. I thank you for your patience and assistance!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.3K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 142 Just for fun
- 58 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!