+ Reply to Thread
Results 1 to 9 of 9

Sum if multiple Criteria is true

  1. #1
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Sum if multiple Criteria is true

    I want to get a sum of a group of cells if multiple criteria is true.

    Column A is the same "Date", and Column B is the same "Line", and column D is the same "Shift",

    So if each row has the same Date, Line, and Shift, I want the sum of column "E" for those respective rows to go in column F for those respective rows.

    Hope that makes sence, see attached for example, notice Shift changes...

    **EDITED
    Please note I need to do this in an Excel 2003 atmosphere.
    Last edited by 00Able; 02-19-2011 at 09:17 PM.
    Providing Problems for Your Solutions
    STARS are my Punching Bag, You will be rewarded.

    In the rare event that I may help you, feel free to make me see STARS

  2. #2
    Registered User
    Join Date
    10-05-2010
    Location
    S.A
    MS-Off Ver
    Excel 2007
    Posts
    99

    Re: Sum if multiple Criteria is true

    Quote Originally Posted by 00Able View Post
    So if each row has the same Date, Line, and Shift, I want the sum of column "E" for those respective rows to go in column F for those respective rows.
    for multiple criteria you need sumifs
    but here what do you mean by if each row has the same date, line and shift?
    also, are the numbers in column F in your sample file true?
    thanks

  3. #3
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Sum if multiple Criteria is true

    what do you mean by if each row has the same date, line and shift?
    If row 2 and row 3 share the same date, same line, and same shift, then sum the value in cell E, and put the result in cell F.

    But row 2,3,4,5,and 126 could share those same 3 values, and then I would need the sum of them.

    are the numbers in column F in your sample file true?
    If I did my math correctly, Column F should be accurate.

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Sum if multiple Criteria is true

    Here, try this:

    =SUMIFS($E$2:$E$1000,$A$2:$A$1000,A2,$B$2:$B$1000,B2,$D$2:$D$1000,D2)

    Extend range as you need but you must have same ranges
    Never use Merged Cells in Excel

  5. #5
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Sum if multiple Criteria is true

    Works great in the newer versions of excel, but will not work in older versions.
    Last edited by 00Able; 02-19-2011 at 09:40 AM.

  6. #6
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Sum if multiple Criteria is true

    I forgot to mention that I will be using this formula in a 2003 excel environment and will need it to work accordingly. So although the above code will work, it will not in the environment I need it to, any other thoughts?

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,054

    Re: Sum if multiple Criteria is true

    Try :

    =SUPRODUCT($E$2:$E$1000, --($A$2:$A$1000=A2), --($B$2:$B$1000=B2), --($D$2:$D$1000,D2))

    However, SUMPRODUCT formula is quite a slow so it would be better to create new column (F) where you could CONCATENATE columns A, B and D and then you can use SUMIF formula in 2003.

    If you would use SUMPRODUCT formula keep your range at minimum ($1000 part)

  8. #8
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Sum if multiple Criteria is true

    Thank You for providing each method, I do agree I think I may add the helper column and go that route. It works, Thanks again!

  9. #9
    Valued Forum Contributor mahju's Avatar
    Join Date
    11-27-2010
    Location
    Pakistan, Faisalabad
    MS-Off Ver
    Excel 2010 plus
    Posts
    730

    Re: Sum if multiple Criteria is true

    Although this thread is marked as solved I may want to add something

    "Sum(if" array function can be used without helper column
    My formula will add total at the end of each level.
    Set of Identical lines ends( Any value changes in the next row).

    See attached sheet

    Be sure to sort your data on Date, Line and shift before

    Use "Ctrl + Shift + Enter" to enter the formula

    Thanks

    Best Regards
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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