Need help with a sumifs formula
I need to figure out why my "sumifs" formula is not working. I want to total a duration column if a payroll Item column contains one of 3 possible choices. My formula is as follows...
=SUMIFS(Duration:Duration, Payroll Item:Payroll Item, "Hourly",[Payroll Item:Payroll Item, "Overhead Hourly"], [Payroll Item:Payroll Item, "Officer Hourly"])
Not sure what is wrong with this formula or why it will not work.
Thanks!
Best Answer
-
There's a couple things to note here. The first is that whenever you have a column name with a space in it or numbers, you'll need to enclose the name in [these].
For example:
Payroll Item:Payroll Item
Should be:
[Payroll Item]:[Payroll Item]
See: Create a Cell or Column Reference in a Formula
The next thing is that since you're looking for multiple possible options, instead of listing them in a row like that (which means "AND", so it will exclude cells that only contain one option), we'll want to add in an OR statement and use @cell as the range in the OR statement, like so:
[Payroll Item]:[Payroll Item], OR(@cell = "Hourly", @cell = "Overhead Hourly", @cell = "Officer Hourly")
Full formula:
=SUMIFS(Duration:Duration, [Payroll Item]:[Payroll Item], OR(@cell = "Hourly", @cell = "Overhead Hourly", @cell = "Officer Hourly"))
Let me know if this works for you!
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
Answers
-
There's a couple things to note here. The first is that whenever you have a column name with a space in it or numbers, you'll need to enclose the name in [these].
For example:
Payroll Item:Payroll Item
Should be:
[Payroll Item]:[Payroll Item]
See: Create a Cell or Column Reference in a Formula
The next thing is that since you're looking for multiple possible options, instead of listing them in a row like that (which means "AND", so it will exclude cells that only contain one option), we'll want to add in an OR statement and use @cell as the range in the OR statement, like so:
[Payroll Item]:[Payroll Item], OR(@cell = "Hourly", @cell = "Overhead Hourly", @cell = "Officer Hourly")
Full formula:
=SUMIFS(Duration:Duration, [Payroll Item]:[Payroll Item], OR(@cell = "Hourly", @cell = "Overhead Hourly", @cell = "Officer Hourly"))
Let me know if this works for you!
Cheers,
Genevieve
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
-
Worked like a dream! Thank you!! 😊
-
Wonderful! I'm so glad. Thanks for letting me know 🙂
Join us for Jumpstart 2025 with Community on 23 January (in two time zones)! 🎉 Register here.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Customer Resources
- 65.1K Get Help
- 444 Global Discussions
- 142 Industry Talk
- 472 Announcements
- 5K Ideas & Feature Requests
- 83 Brandfolder
- 150 Just for fun
- 71 Community Job Board
- 489 Show & Tell
- 33 Member Spotlight
- 2 SmartStories
- 301 Events
- 36 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!