Add column values where another column meets a criteria
Hello,
I'm trying to add up the values in "Hours per week" where the "Employee name" does not equal "OPEN". Where am I going wrong?
Any help appreciated!
Answers
-
As everything is on the same sheet. You don't need to do an index collect.
=Sumifs([Hours Per Week]1:[Hours Per Week]10,[Employee Name]1:[Employee Name]10<>"Open")
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
-
I noticed a slight syntax error in the formula I gave. This new formula fixes it.
=Sumifs([Hours Per Week]1:[Hours Per Week]10,[Employee Name]1:[Employee Name]10,<>"Open")
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
-
@Mark.poole is there a way to do this without noting the end row? I want it to sum all the above columns that match the criteria even if extra rows are added.
-
The problem is if you don't notate the end row it will try to count itself which is what's causing the error.
IF you do a hierarchy. Making the rows you want to sum as the children. Move the master total to the top of the names. Indent all the names to be children of Master total. Then you can do
=SUMIFS(CHILDREN([Hours per week]1), CHILDREN([Employee Name]1), "Open")
If you found this comment helpful. Please respond with any of the buttons below. Awesome🖤, Insightful💡, Upvote⬆️, or accepted answer. Not only will this help others searching for the same answer, but help me as well. Thank you.
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.4K Get Help
- 424 Global Discussions
- 221 Industry Talk
- 464 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 144 Just for fun
- 61 Community Job Board
- 463 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 300 Events
- 39 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!