+ Reply to Thread
Results 1 to 9 of 9

SUMIFS giving incorrect results

  1. #1
    Registered User
    Join Date
    08-11-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    4

    SUMIFS giving incorrect results

    Hi all! I'm having issues with a SUMIFS formula, and perhaps I'm not even using the right formula. What I want is to pull the SUM of Monetary column for a specific year (or years) and by phase. In some instances I want to add accounting period.


    Column information:
    H= Fiscal Year
    I=Accounting Period
    K=Phase
    Y=Monetary

    The formula I'm using is:
    =SUMIFS(Y:Y,H:H,"2010",K:K,"9101")

    Which should be giving me the sum of everything in 2010 phase 9101. Right? The value my formula gives is $306,250 when it should be $16,262.

    So I'm obviously pulling more data than I should. Even if I change my formula to
    =SUMIFS(Y2:Y1167,H2:H1167,"2010",K2:K1167,"9101") to ensure the ranges are all the same, I get the same result.


    I've tried troubleshooting the Fiscal Year column to formatting it as TEXT version a date. But that doesn't work either.

    Any help or ideas would be greatly appreciate.
    Attached Files Attached Files
    Last edited by suzannemarie; 08-11-2021 at 01:25 PM.

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: SUMIFS giving incorrect results

    I think this will be difficult to debug without seeing the actual data. You are correct that this should only sum those records where H is 2010 and K is 9101. It appears that it is finding more records with those identifiers than you think there are. If I were debugging this, I would probably select the main database -> Autofilter, then filter the database for H is 2010 and K is 9101. Then I can look to see if I was correctly identifying the records that should be included or see if there are more records that fit the two criteria.

    If you are unfamiliar with using autofilter to filter a list/database: https://www.wikihow.com/Use-AutoFilter-in-MS-Excel
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    08-11-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    4

    Re: SUMIFS giving incorrect results

    So I tried that. The data, when filtered, is correct. There are no weird outliers or random numbers that shouldn't be there. Which is why I was thinking maybe my formula was wrong or I'm not using the best formula for this type of data.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: SUMIFS giving incorrect results

    As suggested by MrShorty post a file showing the "error" condition.

  5. #5
    Forum Contributor
    Join Date
    02-27-2004
    Location
    California, United States
    MS-Off Ver
    Excel 2016
    Posts
    315

    Re: SUMIFS giving incorrect results

    Have you tried changing "2010" and "9101" to cell references where you enter those values? And, are the values for "2010" and "9101" stored as numerical or text in your database? Have you run a LEN() on the "2010" and "9101" values in your database to see if there are any hidden characters? Just some thoughts.

  6. #6
    Registered User
    Join Date
    08-11-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    4

    Re: SUMIFS giving incorrect results

    I've added the file with the example data in it that's not working

  7. #7
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,169

    Re: SUMIFS giving incorrect results

    The answer of 306250.01 is correct:

  8. #8
    Registered User
    Join Date
    08-11-2021
    Location
    United States
    MS-Off Ver
    2016
    Posts
    4

    Re: SUMIFS giving incorrect results

    I understand the problem now. In Column E "Account" there were three accounts de-selected. So the SUMIFS is still selecting that information even though they have been filtered out. So is there a way to continue with the SUMIFS while removing those three accounts? (5014310, 5014510, 50232302)

  9. #9
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,819

    Re: SUMIFS giving incorrect results

    From this starting point, it is probably easier to think of "which accounts to include in the SUMIFS()" rather than think of "which accounts to exclude". My first thought is something like =SUMIFS(...,E:E,"5011110")+SUMIFS(...,E:E,"5011120")+... where you have a SUMIFS() function for each account number and add up the result.

    My older version doesn't have it, but the AGGREGATE() function in conjunction with the autofilter might be useful here: https://support.microsoft.com/en-us/...rs=en-us&ad=us One of the options that can be set in the AGGREGATE() function is to ignore hidden rows. Something like =AGGREGATE(9,5,F:F) will sum up column F. Then when you use the filter to hide rows you don't want included, AGGREGATE() should ignore the hidden rows.

    Since this feels like a database summary kind of thing, a pivot table or maybe power pivot (Get and Transform) might be better suited to this kind of conditional summation.

+ 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] Index/match giving correct results, wrong results & #N/A results...sometimes
    By mrteater in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-27-2019, 10:41 AM
  2. Replies: 8
    Last Post: 06-07-2016, 11:28 AM
  3. [SOLVED] Date Differences + #VALUE! giving incorrect results
    By Rosco88 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 09-18-2015, 09:36 AM
  4. [SOLVED] Pivot Table formula giving incorrect results
    By some_evil in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-20-2014, 06:30 PM
  5. [SOLVED] Forumula Results Incorrect when data missing. Wanting to hide the incorrect formula.
    By firemedic6265 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 02-05-2014, 05:01 PM
  6. Replies: 2
    Last Post: 12-28-2011, 06:57 AM
  7. Input Box giving incorrect results
    By jamesryan in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-16-2009, 07:31 AM

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