I am trying to make a formula that calculates the sum of orders from a table if it matches the product type text string (for example, 'socks') and is within a specific price range (for example, '>=0.1' and '<=0.99'


D2:D7 = orders

A2:A7 = product type

C2:C7 = price

I'm at a bit of a loss with it - any help would be appreciated.

enter image description here


1 Answer 1


Use sumifs() instead of sumif(), like this:

=sumifs(D2:D7, A2:A7, "Socks", C2:C7, ">= 0.1", C2:C7, "< 0.99")

  • Ah perfect - thanks a lot!
    – magelincs
    Apr 26 at 19:26
  • but this is a formula that only partially solves the problem ... it takes into consideration only one range (the lowest) and cannot be "extended" ... I'm pretty sure you could give a better one :)
    – Daniele
    Apr 26 at 19:46
  • @Daniele you are right. The solution can be extended to extract the lower and upper limit from column F, and also to use absolute row references. It can also be turned to an array formula to calculate all results in one go. The OP already said that the simple formula is perfect for them, but nevertheless — please post a better answer if you think one is necessary. Apr 26 at 20:13
  • I think it is better to wait for any requests from the OP ... anyway I have a solution that takes into account all the ranges, but I haven't been able to put it in array
    – Daniele
    Apr 26 at 20:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.