+ Reply to Thread
Results 1 to 10 of 10

sum with multi conditions

  1. #1
    Registered User
    Join Date
    07-07-2009
    Location
    Karachi
    MS-Off Ver
    Excel 2007
    Posts
    26

    Post sum with multi conditions

    Hi!
    I have the followin data.

    A B C D E F g
    SB No KW Mot_No FrB_No qty rea_br Qty
    1 0.37 2 6202 2 6202 2
    1 0.75 6 6204 6 6203 6
    1 1.1 11 6205 11 6205 11
    2 2.2 3 6306 3 6206 3
    2 5.5 3 6307 3 6207 3
    2 18.5 4 6310 4 6210 4
    1 22 8 6310 8 6308 8
    1 30 2 6213 2 6211 2
    3 37 1 6312 1 6212 1
    3 55 1 Nu217 1 6217 1
    3 75 3 6316 3 6316 3
    1 300 3 6322 3 6322 3

    i need that if enter bR_No,SBNo then it return qty form both column of qty where Br= 6202. Where 6202 exist in both column"D" & "F" and qty in column "E" & "H"

    BR_No SB NO Qty expected result
    6202 1 ? 4
    6213 3 ? 2
    6322 1 ? 6

    Thanks and regards
    Last edited by sheryar; 09-02-2009 at 01:01 PM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: sum with multi conditions

    Not sure I understand from your source data how you get 2 for 6213/3 given there are no instances of SB No = 3 and D/F being 6213 ?

    If we assume you put 6202 into H2 and 1 into I2 then to get total in J2 (given your use of XL2007)

    Please Login or Register  to view this content.
    For backwards compatible version you're looking at SUMPRODUCT which will be a little less efficient:

    Please Login or Register  to view this content.
    note with sumproduct it is imperative you keep ranges to a minimum.
    Last edited by DonkeyOte; 09-01-2009 at 05:05 AM. Reason: typo

  3. #3
    Registered User
    Join Date
    07-07-2009
    Location
    Karachi
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: sum with multi conditions

    Hi D.K!

    Please see the attach filr this may explain a bit.
    Attached Files Attached Files
    Last edited by sheryar; 09-01-2009 at 08:27 AM.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: sum with multi conditions

    Note: Excel Jeanie does not work on this particular forum - please attach a file directly rather than screenshot.

    On an aside, if you have posted this question on other forums please ensure you provide links.

  5. #5
    Registered User
    Join Date
    07-07-2009
    Location
    Karachi
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: sum with multi conditions

    HI!
    Please see the file in above reply.
    thanks

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: sum with multi conditions

    test(1).xls



    Also, more usefull is to write in expected result rather than Q(?)
    Last edited by zbor; 09-01-2009 at 08:57 AM.

  7. #7
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: sum with multi conditions

    Based on your initial post I suspect:

    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    07-07-2009
    Location
    Karachi
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: sum with multi conditions

    Hi!

    In the attached file yellow color contain (column |E| & "G") the bearing no of intrest "6206" , and their quantity are in column "F" & "H". Where they are categrozied by coloumn "A" switch board No.
    If the Bearing No. belong to switch board 1, then look for match in column E&G and sum their numbers from column "F" & "H".

    may be now its clear.
    Thanks for your reply.
    Attached Files Attached Files

  9. #9
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,601

    Re: sum with multi conditions

    DQ formula, just range was moved for one cell:

    Just copy in B22 and extend right and down

    =SUMIFS($F$2:$F$18;$E$2:$E$18;$A22;$A$2:$A$18;B$21)+SUMIFS($H$2:$H$18;$G$2:$G$18;$A22;$A$2:$A$18;B$21)

    or with ,

    =SUMIFS($F$2:$F$18,$E$2:$E$18,$A22,$A$2:$A$18,B$21)+SUMIFS($H$2:$H$18,$G$2:$G$18,$A22,$A$2:$A$18,B$21)
    Last edited by zbor; 09-01-2009 at 09:41 AM.

  10. #10
    Registered User
    Join Date
    07-07-2009
    Location
    Karachi
    MS-Off Ver
    Excel 2007
    Posts
    26

    Re: sum with multi conditions

    Hi!
    Thanks D.K and zbor for your help

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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