+ Reply to Thread
Results 1 to 6 of 6

SUMIF formula to identify column matching a named cell

  1. #1
    Registered User
    Join Date
    08-07-2017
    Location
    London
    MS-Off Ver
    MS 2010
    Posts
    4

    SUMIF formula to identify column matching a named cell

    Hi all,

    Hoping someone may be able to help with this query.

    I have a summary sheet and a data sheet. On the data sheet are the months Jan-Dec in columns B-M and names in column A (eg Caroline). On the summary sheet I have created a drop down list to enable me to choose the month I want and labelled the cell "CurrentMonth" in the Name Manager.

    Is there a formula I can write that will know to sum everything in the "CurrentMonth" column for a specified name (eg Caroline)?

    I have written the below but it is giving me a #REF! error.

    =SUMIF(INDIRECT("'"&"Data Sheet"&"'!$A:$A"),"Caroline",INDIRECT("'"&"Data Sheet"&"CurrentMonth"))

    Thanks!

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: SUMIF formula to identify column matching a named cell

    Make sure that the named range is given the workbook setting, not sheet, then try this:

    =SUMPRODUCT(('Data Sheet'!A$2:A$1000="Caroline")*(CurrentMonth="January"),'Data Sheet'!B$2:M$1000)

    or without a named range:

    =SUMPRODUCT(('Data Sheet'!A$2:A$1000="Caroline")*('Data Sheet'!B$1:M$1="January"),'Data Sheet'!B$2:M$1000)
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-07-2017
    Location
    London
    MS-Off Ver
    MS 2010
    Posts
    4

    Re: SUMIF formula to identify column matching a named cell

    Thank you that was really helpful. The second formula without the named range worked but not the first. The Name Manager shows that it is valid for the whole workbook..

    I had wanted to use a named range in the formula so it would automatically update for a new month when i updated the drop down for the next month. Is that possible?

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: SUMIF formula to identify column matching a named cell

    Yes. Like this:

    =SUMPRODUCT(('Data Sheet'!A$2:A$1000="Caroline")*('Data Sheet'!B$1:M$1=$A$1),'Data Sheet'!B$2:M$1000)

    Just change $A$1 to the cell with the drop-down.

    There is no need for named cells or named ranges.
    Last edited by AliGW; 08-07-2017 at 07:50 AM.

  5. #5
    Registered User
    Join Date
    08-07-2017
    Location
    London
    MS-Off Ver
    MS 2010
    Posts
    4

    Re: SUMIF formula to identify column matching a named cell

    Thank you very much, that was worked perfectly

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,460

    Re: SUMIF formula to identify column matching a named cell

    You're welcome!

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ 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. Identify and display matching cells in a single column
    By tbrookes3 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2017, 08:55 AM
  2. Formula to Identify Named Range
    By RVA_ExcelMonkey in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 12-02-2015, 04:13 PM
  3. VBA to test if a cell is contained in a specific named column in a named table?
    By brucemc777 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-14-2015, 05:34 PM
  4. [SOLVED] Extracting cell data to identify a named range
    By JimDandy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-08-2015, 09:36 AM
  5. 2 sheets, identify matching and non-matching rows
    By athyeh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-10-2014, 02:40 PM
  6. Identify active cell and use the column to add formula to another cell
    By JonPugh in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-01-2009, 12:32 PM
  7. How do I identify cells with matching numbers within a column.
    By dbmeyer in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-26-2006, 06:40 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