+ Reply to Thread
Results 1 to 24 of 24

sumif with multiple conditions help

Hybrid View

  1. #1
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    sumif with multiple conditions help

    Hi there,

    I was wondering if it is possible to have a sumif with multiple conditions

    example
    col 1 col 2 col 3 col 4
    123 A C 13
    345 A D 12
    567 A E 10
    789 B F 23

    Would it be possible to have it sumif col1 = 123 but then col 2 has to = A and col 3 can be in the following C,D,E, of F. Then sum col4 of those that meet that criteria?

  2. #2
    Registered User
    Join Date
    02-22-2012
    Location
    Thailand
    MS-Off Ver
    Excel 2010
    Posts
    62

    Re: sumif with multiple conditions help

    I think you could write it using an and function. So then it would become something like:

    =SUMIF(D1:D4,AND(A1:A4=123,B1:B4="a",C1:C4="c"))

    I am not sure if this would work, but I think we are very close
    Last edited by Kybynn; 04-20-2012 at 12:43 AM.

  3. #3
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: sumif with multiple conditions help

    Will this helps you.

    =SUMIFS(D1:D4,B1:B4,"A",C1:C4,"C")

  4. #4
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    hmm, will it allow me to put multiple variable for col3?

    I'll have destination points in col3, so i wanted to be able to say calculate col4 if the destinations are tx, fl, ga, ca, and oh.

  5. #5
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: sumif with multiple conditions help

    Given that your profile states 2003, and the limited data you have provided, you could try ...
    =SUMPRODUCT(--(A2:A5=123),--(B2:B5=B2),D2:D5)
    If this isn't what you need, post a sample workbook showing typical data and your expected result.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  6. #6
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    we just recently switched to 2010

    i'll post a sample of the excel page for ya in a bit

  7. #7
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    dummy.xlsx

    im looking at the excel you made and it's missing one thing.

    Col 2 represents departure point and Col 3 represent destination point.

    Col 1 would represent transportation number

    So what i'm trying to do is have a formula that searches a specific transportation number ie 123
    departing from point A and going to D,E,F, and C

    so A->D
    A ->E
    A ->F
    A ->C

    and if it does going to either of those point then it would add the volume in Col 4.
    Last edited by hawee; 04-21-2012 at 09:36 AM.

  8. #8
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    any luck guys?

  9. #9
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: sumif with multiple conditions help

    Your sample is still somewhat vague.

    Try these dynamic formulae. Your list can be any length.
    If you need to work with 2003 then you will have to use SUMPRODUCT(), for 2007 and above only, use SUMIFS()

    Again if this doesn't work for you, post a larger sample of your actual workbook.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    Hey Marcol,

    Thanks for the help.
    It's really close to what I need it to do.

    I've attached a file with a bigger sample.

    The only thing wrong is it's calculating all destination points. I only want it to calculate destination point 1,2,3,4,5, and 6.

    If you look at the file.

    11203 should equal - 400, not 800
    11205 should equal - 600, not 800

    How to I specify only those points to be calculated.

    Book1_hawee.xls

  11. #11
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    also its for Excel 2007

  12. #12
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: sumif with multiple conditions help

    Quote Originally Posted by hawee View Post
    ...its for Excel 2007
    Use,

    =SUM(SUMIFS(D:D,A:A,F3,B:B,G3,C:C,{1,2,3,4,5,6}))
    Regards,
    Haseeb Avarakkan

    __________________________________
    "Feedback is the breakfast of champions"

  13. #13
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: sumif with multiple conditions help

    Okay, try this workbook

    I don't have 2007 at the moment so that formula might need checking.
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    Almost there, lol

    Sorry I guess I need to mention that I'll have to specify the points. It will be 1,2,3,4,5,6,10,12,13,15,20,24,42.

    Is there a way to do that?

    Thanks,
    Harry

  15. #15
    Forum Guru
    Join Date
    05-24-2011
    Location
    India
    MS-Off Ver
    365
    Posts
    2,243

    Re: sumif with multiple conditions help

    See the attached.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    perfect!! ty very much

  17. #17
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: sumif with multiple conditions help

    Neat solution Haseeb, couldn't give you rep for your idea, (seems I've been "bumping" your rep), so a "well done" will have to suffice.

  18. #18
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    Hey Guys,

    I actually need to make a few tweaks and can't seem to figure it out, so i'm back to asking for some help.

    Instead of have 1 departure, we have multiple departure

    So in theory I would like it to let me know the volume of a contract base on specific departure and destination.

    Is it possible to just add an index for the departure?

    Thanks

  19. #19
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    any help please?

    bump

  20. #20
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: sumif with multiple conditions help

    See the attached.
    Attached Files Attached Files

  21. #21
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    help please
    bump again

  22. #22
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    Hey Guys,

    I actually need to make a few tweaks and can't seem to figure it out, so i'm back to asking for some help.

    Instead of have 1 departure, we have multiple departure

    So in theory I would like it to let me know the volume of a contract base on specific departure and destination.

    Is it possible to just add an index for the departure?

    Thanks

  23. #23
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    any help? please

  24. #24
    Registered User
    Join Date
    02-15-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    28

    Re: sumif with multiple conditions help

    hmm i see it working on the attacked excel sheet, but when i put it in my sheet it's giving me " #value! " as the response.

    here's what i had to edit the code to line up with my sheet

    =SUMPRODUCT((B$186:B$3000=J18)*(ISNUMBER(MATCH(D$186:D$3000,Seg!F$3:F$8,)))*(ISNUMBER(MATCH(K$186:K$3000,Seg!A$3:A$100,)))*I$186:I$3000)

+ 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