+ Reply to Thread
Results 1 to 3 of 3

SUMIF subtraction with multiple conditions (OR)

  1. #1
    Registered User
    Join Date
    04-08-2014
    Location
    Antwerp, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    10

    SUMIF subtraction with multiple conditions (OR)

    Hi everyone,

    I'm having another issue where I want to add up the stock (B8:B107) if it needs to be handled with care, marked with "x" (V8:V107), a simple SUMIF, I got that covered with =SUMIF(F8:F107;"x";B8:B107). Now I don't want to add the stock if it meets other conditions in other columns, let's say if the stock is indoor (marked with an "in" in C8:C107) or if it's a liquid (marked with "lq" in D8:D107), so they need to be substracted from the first sum.

    So basically I used the first SUMIF and subtracted the first condition with a new SUMIFS and added another SUMIFS for the second condition, naturally it subtracts twice, but it needs to substract it once
    =SUMIF(F8:F107;"x";B8:B107)-SUMIFS(B8:B107;V8:V107;"x";C8:C107;"in")-SUMIFS(B8:B107;F8:F107;"x";D8:D107;"lq")

    I tried putting the conditions in one big SUMIFS but this would imply it would only substract if the product is a liquid AND if it's stored inside, but I want to substract when it's either liquid OR indoor
    =SUMIF(F8:F107;"x";B8:B107)-SUMIFS(B8:B107;F8:F107;"x";C8:C107;"in";D8:D107;"lq").

    My question, how do I add the products to be handled with care, except if they are a liquid or if they are stored inside. A file has been attached to aid in making things clear. There are other columns in the original sheet which do not apply to this question, so they are omitted.


    Thank you very much


    SUMIF - OR.xlsx

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,653

    Re: SUMIF subtraction with multiple conditions (OR)

    Try:
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Registered User
    Join Date
    04-08-2014
    Location
    Antwerp, Belgium
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: SUMIF subtraction with multiple conditions (OR)

    Thank you Kaper!

    At first it seemed to work, but when I checked it in my example, it leaves out product "C" in row 4, even though it has the same criteria as product "F" in row 7. Any thoughts on why it leaves out the values in row 4, or am I overlooking something?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 8
    Last Post: 07-17-2013, 02:13 PM
  2. SUMIF with multiple conditions
    By wmjenner in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-25-2012, 11:53 PM
  3. Trying to SumIf on multiple conditions
    By foxguy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-05-2009, 03:43 PM
  4. sumif with multiple conditions
    By Ray in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 09-22-2005, 08:05 PM
  5. sumif - multiple conditions
    By J_Barn in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 02:05 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1