+ Reply to Thread
Results 1 to 6 of 6

Add up multiple ranges of data based on criteria.

  1. #1
    Registered User
    Join Date
    12-16-2009
    Location
    Salt Lake City, UT
    MS-Off Ver
    Excel 2003
    Posts
    1

    Talking Add up multiple ranges of data based on criteria.

    In a nutshell, I want to do a SUMIF() but with multiple seperate ranges, single criteria.

    If it's a single range, SUMIF() works exactly the way I'd expect. That is unfortunately not the case here.

    Thus far I've tried a couple of approaches:

    --Seperating ranges, with parens and commas:
    =SUMIF((B1,N1,Z1),">0") --Gave a value error

    --Assigning B1, N1 and Z1 to the named range 'values':
    =SUMIF(values,">0") --Also gave a value error

    It's looking to me that SUMIF() simply doesn't handle adding up separate ranges.

    Perhaps there is another approach? Is my syntax incorrect?

    Any help would be awesome.

  2. #2
    Forum Expert Palmetto's Avatar
    Join Date
    04-04-2007
    Location
    South Eastern, USA
    MS-Off Ver
    XP, 2007, 2010
    Posts
    3,978

    Re: Add up multiple ranges of data based on criteria.

    Edit: deleted formula - untested and doesn't return correct results
    Last edited by Palmetto; 12-16-2009 at 11:23 PM.
    Palmetto

    Do you know . . . ?

    You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.

  3. #3
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Add up multiple ranges of data based on criteria.

    =if(and(b1>0,n1>0,z1>0),sum(b1,n1,z1),"")
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  4. #4
    Forum Expert darkyam's Avatar
    Join Date
    03-05-2008
    Location
    Houston, TX
    MS-Off Ver
    2013
    Posts
    2,191

    Re: Add up multiple ranges of data based on criteria.

    Martin, I don't think yours will work. Your formula requires all three cells to be >0 to be summed. I think the OP wants to sum any of them that are above 0.

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Add up multiple ranges of data based on criteria.

    if that was the case just sum (b1,n1,z1) unless there are -ve values
    =SUM(IF(B1>0,B1,0),IF(N1>0,N1,0),IF(Z1>0,Z1,0))
    palmettos sums up anything in range b1:z1
    also
    =SUM(SUMIF(INDIRECT({"b1","n1","z1"}),">0")
    Last edited by martindwilson; 12-16-2009 at 07:21 PM.

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

    Re: Add up multiple ranges of data based on criteria.

    It seems this is check every 12th column type affair... so if you have lots of cells you could if nec. use SUMPRODUCT, eg:

    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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