+ Reply to Thread
Results 1 to 5 of 5

SUMIFS with different range sizes

  1. #1
    Registered User
    Join Date
    02-12-2021
    Location
    Dublin, Ireland
    MS-Off Ver
    Office 365
    Posts
    2

    Question SUMIFS with different range sizes

    Hi everyone,

    I am trying to roll positive monthly cash flows from one table into 'Total Revenue' by year in another sheet.

    Please Login or Register  to view this content.
    seems to work to provide all cash flows for each year. However, if I try to move to a SUMIFS statement to add the condition of positive numbers only :
    Please Login or Register  to view this content.
    I get the #VALUE error as the ranges are not the same size. Hoping someone can help me on this and apologies if my code in the below worksheet is unruly but I'm a total Excel novice.

    Thanks in advance!
    Attached Files Attached Files
    Last edited by exeliscious; 02-12-2021 at 06:25 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: SUMIFS with different range sizes

    Try it with SUMPRODUCT, like this in E5:

    =SUMPRODUCT(Model!F18:L318,(Model!P18:P318=E3)*(Model!F18:L318>0))

    You may need to anchor the ranges if you wish to copy across and/or down.

    Hope this helps.

    Pete

  3. #3
    Forum Expert
    Join Date
    07-06-2004
    Location
    Northern California
    MS-Off Ver
    2K, 2003, 2010, O365
    Posts
    1,490

    Re: SUMIFS with different range sizes

    While the 1st formula you show may return a numeric result, I don't believe it returns a correct result. I believe Excel only sums the values in Model!F18:F318. Indeed, if I have {1,20;300,4000} in C3:D4, {1;0} in A3:A4, =SUMIF(A3:A4,1,C3:D4) returns 1 rather than 21 in web Excel.

    In any case, you need to use SUMPRODUCT.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  4. #4
    Forum Expert
    Join Date
    10-10-2016
    Location
    Sheffield
    MS-Off Ver
    365 and rarely 2016
    Posts
    3,212

    Re: SUMIFS with different range sizes

    You haven't provided your expected answer is the below any closer
    =SUMPRODUCT((Model!F18:L318)*(Model!P18:P318=E3)*(Model!F18:L318>0))

  5. #5
    Registered User
    Join Date
    02-12-2021
    Location
    Dublin, Ireland
    MS-Off Ver
    Office 365
    Posts
    2

    Re: SUMIFS with different range sizes

    Thank you all! That helped me find another mistake as well.
    Last edited by exeliscious; 02-12-2021 at 06:34 AM.

+ 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. [SOLVED] SUMPRODUCT different range sizes
    By mourt in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 10-05-2019, 12:27 PM
  2. Dynamic Range Sizes in Formulas
    By Speshul in forum Tips and Tutorials
    Replies: 5
    Last Post: 09-15-2014, 09:17 AM
  3. Dynamic Range Sizes, including blanks
    By Speshul in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-12-2014, 10:52 AM
  4. Macro to Create Pivot in Multiple Workbooks (Differing range sizes)
    By icebreak22 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2014, 04:09 PM
  5. Matching a column of shaft sizes to a column of hole sizes to find best match for all
    By BrettRCourtney in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-09-2013, 11:25 AM
  6. Larger sizes against smaller sizes
    By nathanocs in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-13-2013, 04:41 PM
  7. Custom formula run in blanks for varying range sizes
    By Rattler04 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2009, 05:01 PM

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