SUMIFS Question
Could you please provide guidance on the "SUMIFS" formula? I'm trying to calculate the following information:
- Sum the amount of a service type completed between a certain amount of time based on the price.
- Goal to add the amount of Nutrition Facts Revision service types completed between April 1 and April 30th based on the Invoice date.
- Columns that using Service Type (Drop Down Text), Invoice Date (Calendar Dates), and Price (Dollars)
- I tried =SUMIFS(Price:Price, [Invoice Date]:[Invoice Date], >=4 / 1 / 19, [Invoice Date]:[Invoice Date] <= 4 / 30 / 19, [Service Type]:[Service Type] = "Nutrition Facts Revision") but it computes to #Invalid Operation.
Thanks!
Answers
-
I did not separate ranges & criteria correctly, also, and if this formula is suppose to calculate the total price for April 19 for the specified service then I would suggest you to use this instead:
=SUMIFS([Price]:[Price],[Invoice Date]:[Invoice Date], AND(MONTH(@cell)=4, YEAR(@cell)=2019), [Service Type]:[Service Type], "Nutrition Facts Revision")
This will do it, and you just need to change the number of the month or year if you want to decline this formula to every month of the year, or future years.
Hope it helped!
-
Thank you!!
-
As a note...
The reason the original formula didn't work is because of how you are referencing the date and because of not separating the range/criteria. To use a date in a formula you have to use the DATE function.
DATE(yyyy, mm, dd)
=SUMIFS(Price:Price, [Invoice Date]:[Invoice Date], >= DATE(2019, 04, 01), [Invoice Date]:[Invoice Date], <= DATE(2019, 04, 30), [Service Type]:[Service Type], = "Nutrition Facts Revision")
Having said that... I personally find it much easier to manage using David's solution.
First: just updating month and year is much easier than trying to remember which months have how many days.
Second: I prefer to use the AND function to join criteria for the same range together. I find that it helps keep things organized in long/complex formulas. It also cuts down on keystrokes and makes it easier for me to read. It also helps cut down on the chances of accidentally grabbing the wrong date column for the month vs the year. Sometimes I move a little too quickly especially with cross sheet references. Haha. That is always a frustrating issue to clear up.
-
Thank you Paul!
-
Happy to help. 👍️
Help Article Resources
Categories
- All Categories
- 14 Welcome to the Community
- Smartsheet Customer Resources
- 64.2K Get Help
- 419 Global Discussions
- 221 Industry Talk
- 461 Announcements
- 4.8K Ideas & Feature Requests
- 143 Brandfolder
- 141 Just for fun
- 58 Community Job Board
- 462 Show & Tell
- 32 Member Spotlight
- 1 SmartStories
- 299 Events
- 38 Webinars
- 7.3K Forum Archives
Check out the Formula Handbook template!