+ Reply to Thread
Results 1 to 5 of 5

SUMIF not adding cell valuesin range

  1. #1
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    SUMIF not adding cell valuesin range

    Can anyone help me please, I have spent hours today at work trying to comprehend why my fomula isn't working. I am usingExel 2003 and referencingranges from 2 worksheets.

    I would post the spreadsheet but am unable to do so from work ad have no external mail.

    =SUMIF(Sheet2!$L$4:$L$54,C6,Sheet1!$L$5:$M$54)

    If I change the last range to a sinngle column it picks up the value however if I u the L/M range it only picks up the value in column L, anyone know why or what I can do to stop this happening?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: SUMIF not adding cell valuesin range

    I could be wrong on this because I have never seen a sumif() built like that, but Im pretty sure that both ranges need to be on the same sheet
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Contributor
    Join Date
    04-12-2013
    Location
    Usually at work, in the UK
    MS-Off Ver
    Excel 2010
    Posts
    639

    Re: SUMIF not adding cell values in range

    I've tried referencing on one sheet but that doesn't produce any values
    Attached Files Attached Files

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

    Re: SUMIF not adding cell valuesin range

    SUMIF works on a one-to-one basis so the criteria range needs to be the same size and shape as the sum range (although it doesn't matter if those ranges are on the same sheet or not). If you don't specify the ranges as the same size then Excel implicitly changes the second range for you, so your formula, as written here, is the equivalent of this

    =SUMIF(Sheet2!$L$4:$L$54,C6,Sheet1!$L$5:$L$55)

    I assume the mismatch in row numbers is a typo but if you want to sum two columns from one criteria column you either need two SUMIFS like this

    =SUMIF(Sheet2!$L$4:$L$54,C6,Sheet1!$L$4:$L$54)+SUMIF(Sheet2!$L$4:$L$54,C6,Sheet1!$M$4:$M$54)

    or use SUMPRODUCT like this

    =SUMPRODUCT((Sheet2!$L$4:$L$54=C6)*Sheet1!$L$4:$M$54)
    Audere est facere

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: SUMIF not adding cell valuesin range

    DDL thanks for the update on not needing to be on the same sheet (I didnt notice the range mis-match though)

+ 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. Enter and update ValuesIn Cell1 Based On Values In Cell 2 And Vice Versa.
    By miroper in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-04-2010, 11:03 AM
  2. Adding a range based on SumIf
    By helpmethanks in forum Excel General
    Replies: 2
    Last Post: 08-25-2009, 12:56 PM
  3. SUMIF not adding a range
    By Kathy in forum Excel General
    Replies: 1
    Last Post: 04-04-2006, 07:40 PM
  4. [SOLVED] Problem adding a range using Sumif function.
    By Domenic in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 AM
  5. [SOLVED] Getting the 2nd largest or smallest valuesin a range
    By Michael Rekas in forum Excel General
    Replies: 5
    Last Post: 01-31-2005, 04:06 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