+ Reply to Thread
Results 1 to 6 of 6

SUMIFS to reference cell containing list of names for criteria

  1. #1
    Registered User
    Join Date
    01-29-2016
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    27

    SUMIFS to reference cell containing list of names for criteria

    I have a spreadsheet, named 'data' with 60,000+ rows with financial income data for all clients. Each row is a payment made by/for a client.
    Column A is the date, column E is the name, column J is the £amount.
    In a seperate sheet I want to create a report to show income received for selected clients within various date ranges.
    In the report sheet I have a title for that row in column A, usually the surname, and in column B (B16 in the examples below) I have the name(s) exactly as it/they appear on the data sheet. Where there is only one name in the cell in column B, the following formula works:

    =SUM(SUMIFS(data!$J:$J,data!$E:$E,B16,data!$A:$A,">=1/1/2008",data!$A:$A,"<=31/12/2008"))

    However where there is more than one name (e.g. when there is a family and I want to show the income for Mr&Mrs) it does not work. I do have a formula that works for multiple names, but this involves putting the names in the formula, e.g.:

    =SUM(SUMIFS(data!$J:$J,data!$E:$E,{"Joe Bloggs","Josephine Bloggs"},data!$A:$A,">=1/1/2008",data!$A:$A,"<=31/12/2008"))

    I would like a universal formula that will work no matter how many names in the cell in column B. I have tried various formats for the cell in column B, but none seem to work:

    {"Joe Bloggs","Josephine Bloggs"}
    "Joe Bloggs","Josephine Bloggs"
    {'Joe Bloggs','Josephine Bloggs'}
    Joe Bloggs,Josephine Bloggs

    As the formula works for only one name, I suspect that it is the way the names are listed in B16 that is the problem, rather than the formula itself.

    Also, is there any way to further refine this by using the column heading as the year? The above formula are for the column headed '2008', and I would like to further standardise so that the date references the column heading - something like ">=1/1/C1" , where C1 is the column header and then copying the formula into the next column will make it D1 etc.

    Thanks in advance! (I am a novice here, so excuse any glaring stupidity or errors!)

    Gareth

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: SUMIFS to reference cell containing list of names for criteria

    Hi and welcome to the forum!

    Not sure I understand why you're going to the (rather tortuous) lengths of having multiple names entered in a single cell.

    If you list them separately in a range of contiguous cells then not only does that - in my opinion - offer a more flexible and logical set-up, but the required formula is also then very straightforward.

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: SUMIFS to reference cell containing list of names for criteria

    Gareth,
    Can you upload a small sample file with sufficient data to illustrate your requirement. To upload an Excel file:

    Click "Go Advanced" then "Paper Clip" icon == > "Add Files",== > "Browse"== > "Upload" == > "Done"

    Thank you.

  4. #4
    Forum Guru AlKey's Avatar
    Join Date
    07-20-2009
    Location
    Lakeland, FL USA
    MS-Off Ver
    Microsoft Office 2010/ Office 365
    Posts
    8,903

    Re: SUMIFS to reference cell containing list of names for criteria

    Maybe you can use a wild card to sum all records with the last name Bloggs

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Last edited by AlKey; 01-29-2016 at 12:01 PM.
    If you like my answer please click on * Add Reputation
    Don't forget to mark threads as "Solved" if your problem has been resolved

    "Nothing is so firmly believed as what we least know."
    --Michel de Montaigne

  5. #5
    Registered User
    Join Date
    01-29-2016
    Location
    London, England
    MS-Off Ver
    2007
    Posts
    27

    Re: SUMIFS to reference cell containing list of names for criteria

    Hi All -

    Many thanks. I think I have a final formula that will work. It does require the various names to be in different cells, as suggested above.
    {=SUM(SUMIFS(data!$J:$J,data!$E:$E,$B6:$D6,data!$A:$A,">=1/1/"&E$2,data!$A:$A,"<=31/12/"&E$2))} ... where E2 is the heading of the column giving the year required.
    I can't use a wildcard for the surname as some couples/groups required have different surnames, and some with the same surname are not part of the same couple/group.

    Thanks again!

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

    Re: SUMIFS to reference cell containing list of names for criteria

    Good solution, just a couple tips.

    If you change SUM to SUMPRODUCT, you won't need to enter the formula as an array with CSE.

    Don't use entire column references like $E:$E with that formula, That creates A LOT of unnecessary work on empty/unused rows.
    Restrict it to the actual used area, like $E$2:$E$1000

+ 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 reference criteria is text but I want to reference cell
    By bbeards2 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 11-06-2015, 04:04 PM
  2. From A Table Of Names And Birth Dates Pull A List Of Names As Of A Reference Date And Ther
    By rahuleyes in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 17
    Last Post: 11-27-2014, 03:44 PM
  3. Sumifs with one criteria being a list
    By lorber123 in forum Excel General
    Replies: 6
    Last Post: 09-22-2014, 11:11 AM
  4. [SOLVED] SumIFs, using a list as possible criteria...
    By DeeRok in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 05-30-2014, 07:30 PM
  5. [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
  6. [SOLVED] SUMIFS - multiple criteria on one list?
    By tangcla in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-08-2012, 09:52 PM
  7. VBA: add SUMIFS formula with cell reference as criteria
    By sepi in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2012, 05:57 PM

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