+ Reply to Thread
Results 1 to 16 of 16

SumIFs, using a list as possible criteria...

  1. #1
    Registered User
    Join Date
    05-02-2014
    Location
    Paris, France
    MS-Off Ver
    Excel 2007
    Posts
    32

    SumIFs, using a list as possible criteria...

    Please Login or Register  to view this content.
    That is how my data looks. Basically I want to add a cell that will sum the values of B, if the name in A is also in C. Something like...

    =SumIfs(b:b,a:a,{ANYTHING IN C})

    I also need to be able to add more values to C and have them included automatically, but I don't think that would be a problem.

    Thanks
    Last edited by DeeRok; 05-30-2014 at 01:52 PM.

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SumIFs, using a list as possible criteria...

    Honestly, I would recommend having a seperate sumif for each value in C.
    Then sum the results of those.

    Why? Because I can't imagine not wanting to also know the result for each individual in C
    Surely at some point you will be wanting to know "How many did Joe have"

  3. #3
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: SumIFs, using a list as possible criteria...

    Try this.....

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  4. #4
    Registered User
    Join Date
    05-02-2014
    Location
    Paris, France
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: SumIFs, using a list as possible criteria...

    Quote Originally Posted by Jonmo1 View Post
    Honestly, I would recommend having a seperate sumif for each value in C.
    Then sum the results of those.

    Why? Because I can't imagine not wanting to also know the result for each individual in C
    Surely at some point you will be wanting to know "How many did Joe have"
    We have a separate sumif for each of them already in another section, now we need them added.

    Sktneer, worked perfectly!
    Thanks

  5. #5
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: SumIFs, using a list as possible criteria...

    You're welcome. Thanks for the feedback and rep.

    Moreover you may also adjust the ranges in the formula as per your requirement so that you can add more keywords in col. C like this.......

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    05-02-2014
    Location
    Paris, France
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: SumIFs, using a list as possible criteria...

    Quote Originally Posted by sktneer View Post
    Try this.....

    Please Login or Register  to view this content.
    Works great thanks. Would you mind just explaining what this formula does? It works but I don't really know what it means.

    Also, if I wanted to add more criteria to this, how would I do that?

    Thanks again

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SumIFs, using a list as possible criteria...

    Quote Originally Posted by DeeRok View Post
    We have a separate sumif for each of them already in another section, now we need them added.
    Then just sum those.

    Creating a new formula like this is just duplicating work Excel has already done.

  8. #8
    Registered User
    Join Date
    05-02-2014
    Location
    Paris, France
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: SumIFs, using a list as possible criteria...

    Quote Originally Posted by Jonmo1 View Post
    Then just sum those.

    Creating a new formula like this is just duplicating work Excel has already done.
    Then I'm back to square 1. How do I create a formula that tells excel to sum these values only if they are in the separate list?

  9. #9
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: SumIFs, using a list as possible criteria...

    Quote Originally Posted by DeeRok View Post
    Then I'm back to square 1. How do I create a formula that tells excel to sum these values only if they are in the separate list?
    I don't get it. If you have a separate list of staff on a separate page, say in A1:A10, then in B1 you'd have:
    =Sumif(DataPage!B:B,DatePage!A:A,A1)

    which you can then copy and paste down as far as necessary.

  10. #10
    Registered User
    Join Date
    05-02-2014
    Location
    Paris, France
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: SumIFs, using a list as possible criteria...

    Quote Originally Posted by soberguy View Post
    I don't get it. If you have a separate list of staff on a separate page, say in A1:A10, then in B1 you'd have:
    =Sumif(DataPage!B:B,DatePage!A:A,A1)

    which you can then copy and paste down as far as necessary.
    Because all the staff are listed together so I need to cherry pick which ones I want added. I'm trying to add up certain divisions. I could go to page 1 and see everyone's totals. Then I want to summarize it based on the lists of people on a different page.

    I'm not sure if I'm being clear or not, but this seems like the only way to do it.

  11. #11
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SumIFs, using a list as possible criteria...

    OK, you said
    Quote Originally Posted by DeeRok View Post
    We have a separate sumif for each of them already in another section, now we need them added.
    So the sample you posted, I put an individual sumif for each value from into column D
    =SUMIF($A$2:$A$7,C2,$B$2:$B$7) Highlighted yellow in the attached book.
    These yellow highlighted formulas represent what you said you already have somewhere else.

    I am suggesting to just sum those
    =SUM(D2:D4) Highlighted Green in the attached book.

    EFDeeRok.xlsx

  12. #12
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SumIFs, using a list as possible criteria...

    Quote Originally Posted by DeeRok View Post
    I need to cherry pick which ones I want added.
    OK, I see now. That had not been clear from previous posts.

    See new version of attached file

    EFDeeRokCherryPick.xlsx

  13. #13
    Registered User
    Join Date
    05-02-2014
    Location
    Paris, France
    MS-Off Ver
    Excel 2007
    Posts
    32

    Re: SumIFs, using a list as possible criteria...

    I understand what you guys are saying, it just wouldn't work in my spreadsheet. Maybe it's because I oversimplified the data in the OP. Thank you all for the help though.

    The cherry pick one is the right idea, but it adds an extra column I'd prefer not to have. That would be perfect though if you could do that without column E

  14. #14
    Forum Contributor
    Join Date
    06-21-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: SumIFs, using a list as possible criteria...

    Quote Originally Posted by DeeRok View Post
    Because all the staff are listed together so I need to cherry pick which ones I want added. I'm trying to add up certain divisions. I could go to page 1 and see everyone's totals. Then I want to summarize it based on the lists of people on a different page.

    I'm not sure if I'm being clear or not, but this seems like the only way to do it.
    Well, I can certainly understand that, then. Though I think the solution of summing the SumIf formulas will still work. Let's just tweak it.

    Perhaps you can have a list of staff and their corresponding division?
    Name Group
    John Group A
    Steve Group B
    Sheryl Group B
    Mary Group C
    Larry Group B

    Then you'd have something like:
    Group Total
    Group A
    Group B
    Group C

    Then you just need a formula to go under the Total heading next to the Group, yeah?

  15. #15
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: SumIFs, using a list as possible criteria...

    Quote Originally Posted by DeeRok View Post
    The cherry pick one is the right idea, but it adds an extra column I'd prefer not to have. That would be perfect though if you could do that without column E
    Aren't you already 'adding' a column by creating the new list of your cherry picked names??

    Besides, helper columns are NOT a bad thing.
    XL gives you over 16 thousand of them, might as well use a couple.

  16. #16
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: SumIFs, using a list as possible criteria...

    Here's another one.

    Data Range
    A
    B
    C
    D
    1
    Joe
    10
    Joe
    21
    2
    Mike
    9
    Mike
    3
    Fred
    20
    Tom
    4
    Sam
    3
    5
    Mike
    2
    6
    Sam
    10
    7
    ------
    ------
    ------
    ------


    This formula entered in D1:

    =SUMPRODUCT(SUMIF(A1:A6,C1:C3,B1:B6))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. [SOLVED] sumifs, multiple criteria, one of them being a list?
    By PowerZ in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-16-2014, 06:23 PM
  2. Using a Named List as a criteria in Sumifs Formula
    By yoshik in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-15-2013, 02:14 PM
  3. Help using a list/array as criteria in SUM(SUMIFS())
    By jaredmason in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-15-2012, 08:20 PM
  4. [SOLVED] SUMIFS - multiple criteria on one list?
    By tangcla in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2012, 09:52 PM
  5. Replies: 1
    Last Post: 05-16-2011, 05:00 PM

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