+ Reply to Thread
Results 1 to 4 of 4

Combined SUMIFs

  1. #1
    Registered User
    Join Date
    03-06-2009
    Location
    PORTSMOUTH, ENGLAND
    MS-Off Ver
    Excel 2003
    Posts
    5

    Combined SUMIFs

    I want the SUMIF statement to consider the "text" in two cells and then SUMIF if the two cells meet the criteria eg as below but it does not work.#

    =SUMIF(C20:C50,"PM",E20:E50)+(D20:D50,"BG",E20:E50)
    Last edited by Mac Johnson; 03-19-2009 at 06:11 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combined SUMIFs

    Please PM a Mod and ask for your thread to be moved to the appropriate Forum - ie Worksheet Functions

    re: your formula if you're saying that both C must equal PM and D BG before summing E then:

    =SUMPRODUCT(--(C20:C50="PM"),--(D20:D50="BG"),E20:E50)

    or create a concatenation of C:D say in F

    F20: =C20&":"&D20
    copied down to F50

    Then you can dispense with Array (Sumproduct) and use a standard SUMIF

    =SUMIF(F20:F50,"PM:BG",E20:E50)

    I would generally advise the Concatenation approach myself over Array.

  3. #3
    Registered User
    Join Date
    03-06-2009
    Location
    PORTSMOUTH, ENGLAND
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Combined SUMIFs

    DonkeyOte,
    I have tried the SUMPRODUCT version and I intend to use that, I am trying to prevent the use of additional columns etc, but your point has been noted. Maybe when I am a bit more conversant with trying to manipulate data I will understand why it would be better to do it your preferred way.

    Thanks,
    Mac

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Combined SUMIFs

    Quote Originally Posted by Mac Johnson View Post
    Maybe when I am a bit more conversant with trying to manipulate data I will understand why it would be better to do it your preferred way.
    Arrays are "more expensive" in terms of performance than non-arrays and thus if overused they will affect the overall performance of your model (significantly so pending volume of arrays and ranges involved)... elegance & efficiency do not always go hand in hand in XL unfortunately.

+ 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