+ Reply to Thread
Results 1 to 3 of 3

SUMIF with multi column range?

Hybrid View

  1. #1
    Registered User
    Join Date
    08-02-2009
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2007
    Posts
    84

    SUMIF with multi column range?

    Hi

    i am trying to insert a simple SUMIF function but cannot get it to work.

    i need to add the values in range R5:R250, only if the number 1715 appears in range L5:M250

    I can get it to work on a single column =SUMIF(M5:M250,1715,R5:R250) this works, however if i change to =SUMIF(L5:M250,1715,R5:R250) returns 0.

    Any help would be greatly appreciated, Thanks
    Last edited by Si902; 07-04-2010 at 06:46 PM.

  2. #2
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,723

    Re: SUMIF with multi column range?

    SUMIF always works on a one to one basis so both ranges must always be the same size. Try using SUMPRODUCT

    =SUMPRODUCT((L5:M250=1715)*(0&R5:R250))

    Note that if both L5 and M5 contain 1715 that will sum R5 twice, is that OK?
    Audere est facere

  3. #3
    Registered User
    Join Date
    08-02-2009
    Location
    Lancashire, England
    MS-Off Ver
    Excel 2007
    Posts
    84

    Smile Re: SUMIF with multi column range?

    Daddylonglegs, top form as usual!

    This works great, 1715 should never appear in the same row twice so this is fine.

    Thanks for the great help, im learning slowly but surely.

    Cheers.

    Si

+ 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