I need help with a sumif and countif formula with multiple criteria, one criteria is falling between
Hello I am trying to pull 2 different cross sheet reference formulas.
1.) SUMIF({Auto QA Checklist Range 2}, CONTAINS([Agent Name]1, @cell), {Auto QA Checklist Range 6}) _ I need this result to account for an AND statement, that pulls info between 2 date fields. I am creating a "Filter Sheet" where I can pull info based on "agent name" and "date range".
2.) COUNTIF({Auto QA Checklist Range 2}, CONTAINS([Agent Name]1, @cell)) - Similar to above, right now this is counting data that matches the "Agent Name" field I update. I need it to pull this number, AND further meet criteria between 2 date fields.
Answers
-
You are going to need to use a SUMIFS and a COUNTIFS to be able to incorporate additional range/criteria sets.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
It looks like you said Paul's response didn't resolve your issue, so I'll expand further on his suggestion. Currently you're using a singular SUMIF or COUNTIF formula, but when you need to look for multiple criteria in different columns you'll want to use a SUMIFS or COUNTIFS, plural, with the S on the end.
Here are the 2 related Help Center articles that go through the structure of each function: SUMIFS function / COUNTIFS function
***SUMIFS:***
SUMIFS is great because to build it all you need to do is list the range you want to SUM, then the range with criteria, the criteria, then the next range with criteria, and the next criteria. Since you have your dates built into the sheet already, it will be really easy to reference.
Now, I presume that Range 6 is what you want to SUM. You'll also need to add in a new cross-sheet reference that looks at the DATE column in the other sheet, too. I've called this {Date Column} in my example below.
Try This:
=SUMIFS({Auto QA Checklist Range 6}, {Auto QA Checklist Range 2}, CONTAINS([Agent Name]@row, @cell), {Date Column}, >=[Date Start]@row, {Date Column}, <=[Date End]@row)
Can I also ask why you have CONTAINS? If you know that the Agent Name will be exactly letter-for-letter the same as what's in your Agent Name column, you can list it as the criteria without the additional contains function:
Simplified formula:
=SUMIFS({Auto QA Checklist Range 6}, {Auto QA Checklist Range 2}, [Agent Name]@row, {Date Column}, >=[Date Start]@row, {Date Column}, <=[Date End]@row)
***COUNTIFS:***
Now the COUNTIFS formula will be even easier, as we don't need to list a range to SUM at all. It just goes Range, Criteria, Range, Criteria, etc.
Try This:
=COUNTIFS({Auto QA Checklist Range 2}, [Agent Name]@row, {Date Column}, >=[Date Start]@row, {Date Column}, <=[Date End]@row)
Here are some other Help Center articles I used to help build these out:
Let me know if you have any questions about the above!
Cheers,
Genevieve
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now -
@Genevieve P Thanks. I was running short on time when I posted and forgot to come back with more detail.
Come see me in Seattle at ENGAGE 2024! I will be at the 10xViz partner booth throughout as well as the "Lets Talk About Community" Meet & Eat table on Tuesday from 11:45am - 12:45pm!
-
@Paul Newcome haha no worries! You are absolutely correct in your answer 😊
Just thought I'd write a novel...
Join us at Smartsheet ENGAGE 2024 🎉
October 8 - 10, Seattle, WA | Register now
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 62.9K Get Help
- 379 Global Discussions
- 210 Industry Talk
- 441 Announcements
- 4.5K Ideas & Feature Requests
- 139 Brandfolder
- 129 Just for fun
- 130 Community Job Board
- 449 Show & Tell
- 30 Member Spotlight
- 1 SmartStories
- 300 Events
- 33 Webinars
- 7.3K Forum Archives