+ Reply to Thread
Results 1 to 5 of 5

Is it possible to create a form of SUMIF type of formula with criteria defined as a range?

  1. #1
    Registered User
    Join Date
    03-01-2010
    Location
    Portland, OR
    MS-Off Ver
    Office 365
    Posts
    58

    Is it possible to create a form of SUMIF type of formula with criteria defined as a range?

    I wasn't sure if there was a way so create some kind of conditional summation formula that that can use a range of cells as the criteria instead of having to define each one as you do in SUMIFS.

  2. #2
    Forum Expert gmr4evr1's Avatar
    Join Date
    11-24-2014
    Location
    Texas
    MS-Off Ver
    Office 2010 and 2007
    Posts
    3,448

    Re: Is it possible to create a form of SUMIF type of formula with criteria defined as a ra

    I think we would need more info to be able to determine if it would work or not.
    What range?
    What is the condition?
    1N73LL1G3NC3 15 7H3 4B1L17Y 70 4D4P7 70 CH4NG3 - 573PH3N H4WK1NG
    You don't have to add Rep if I have helped you out (but it would be nice), but please mark the thread as SOLVED if your issue is resolved.

    Tom

  3. #3
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: Is it possible to create a form of SUMIF type of formula with criteria defined as a ra

    If you use a range as the criteria in SUMIF then the result is an array so you need another function to sum that array, e.g. this formula

    =SUMPRODUCT(SUMIF(A2:A100,C4:C7,B2:B100))

    That will sum column B whenever any C4:C7 value occurs in the corresponding row in column A

    If any values are repeated in C4:C7 then you will also sum the relevant rows multiple times.

    An alternative without double counting:

    =SUMPRODUCT(ISNUMBER(MATCH(A2:A100,C4:C7,0))+0,B2:B100)
    Audere est facere

  4. #4
    Registered User
    Join Date
    03-01-2010
    Location
    Portland, OR
    MS-Off Ver
    Office 365
    Posts
    58

    Re: Is it possible to create a form of SUMIF type of formula with criteria defined as a ra

    Quote Originally Posted by gmr4evr1 View Post
    I think we would need more info to be able to determine if it would work or not.
    What range?
    What is the condition?
    So I've attached a sample spreadsheet. Basically given the certain budget account in the Comparison tab, I want use the corresponding IS accounts on the Mapped Accounts Tab to act as the criteria for some kind of Sum function pulling the numbers from the IS tab.

    Does that make sense?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    03-01-2010
    Location
    Portland, OR
    MS-Off Ver
    Office 365
    Posts
    58

    Re: Is it possible to create a form of SUMIF type of formula with criteria defined as a ra

    Quote Originally Posted by daddylonglegs View Post
    If you use a range as the criteria in SUMIF then the result is an array so you need another function to sum that array, e.g. this formula

    =SUMPRODUCT(SUMIF(A2:A100,C4:C7,B2:B100))

    That will sum column B whenever any C4:C7 value occurs in the corresponding row in column A

    If any values are repeated in C4:C7 then you will also sum the relevant rows multiple times.

    An alternative without double counting:

    =SUMPRODUCT(ISNUMBER(MATCH(A2:A100,C4:C7,0))+0,B2:B100)
    Ok I think we are definitely on the right track here as that first formula lets me use a range as the criteria. Now that hard part is finding the most elegant solution described in my above post. I might just add a fourth tab total all the numbers for the given budget accounts, and then use a VLookup to pull that to the comparison page.

+ 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. Sumif's across multiple sheets defined by a dynamic range.
    By Kramxel in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-19-2014, 12:55 PM
  2. Replies: 2
    Last Post: 11-07-2014, 03:16 AM
  3. [SOLVED] Shorten SUMIF + SUMIF + SUMIF each with same reference range but different criteria???
    By HeyInKy in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-13-2014, 09:25 PM
  4. Setting up the range in the criteria section of sumif formula
    By ExMAN999 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-17-2014, 09:14 AM
  5. Replies: 10
    Last Post: 07-24-2013, 11:48 AM
  6. Macro to Insert defined integer into range defined by variable criteria
    By stereofeedback in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-06-2013, 12:33 PM
  7. Excel 2008 : Create list using defined criteria
    By KatBoo in forum Excel General
    Replies: 1
    Last Post: 01-26-2011, 07:44 AM

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