SUMIFS Not Working

I'm on a iMac (Mid 2011) running High Sierra (10.13.6) and Numbers (6.1)


I created a budget in Numbers. I have an Expense table that tracks Description/Amount/Expense/Month since I do the whole year in one table. I use SUMIFS in another table that breaks down each Expense Category (Utility, Auto, Medical, etc) by month. This allows me to see very quickly how much was spent in each month and in each category by month.


Anyway, I copied the whole page (multiple tables) into a new tab for 2020. The SUMIFs all reverted to zero even with the equation still in it. Re-typed the statement, didn't work. Went back to the 2019 sheet and all the SUMIFS are now failing (all show $0.00) when moments ago they were working.


I've always had problems with SUMIFS in Numbers. Anyone know what is going on? I included some photos.


iMac 21.5", macOS 10.13

Posted on Jan 1, 2020 8:28 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 5, 2020 1:04 AM

For what it's worth, when using months with SUMIF/SUMIFS I use the MONTH function to get the month number and base the SUMIF/SUMIFS on the month number, rather than inputting month names to which Numbers, guessing I mean a date-time, assigns the current year.


See this expanded Personal Budget template (Dropbox download) from a few years ago. It does essentially the same thing as the example posted in the original post above: summaries expenses by month and category.


Generally it's best (in both Excel and Numbers) to avoid "hard-wiring" specific criteria into a formula. Put the criteria in cell(s) and have the SUMIFS refer to those.


SG


Similar questions

30 replies

Jan 4, 2020 8:09 PM in response to t quinn

Hi quinn,


It's worth restating for clarity. I don't think it's the Pop-up Menu. Again, here is my SUMIFS function:



I think Numbers turns "=October" into 10/1/CURRENT-YEAR, instead of keeping it say, 10, or 10/1/ANY-YEAR.


When I open a 2019 document, the SUMIFS initially display correctly. When I touch the SUMIFS cell to check the function, the number returns zero and I cannot UNDO the action. Gone forever. The pop-up menus still retain their values, but somehow the function has changed, and they are not being picked up.


Hope that makes sense. In every situation here, I strive to use the words of the months, but Numbers is doing autoformatting on both the pop-up menu and SUMIFS side.



Jan 5, 2020 8:11 AM in response to SGIII

SG wrote:

“avoid "hard-wiring" specific criteria into a formula. Put the criteria in cell(s) and have the SUMIFS refer to those.”


Warning: see this link in this forum:

Does SUMIF convert a text string into an expression?


All codes in column A are formatted as Text.

Column B calculates the length of each code: LEN(A).

Column C calculates the SUM of the length of each code (which has to be the same as the length in column B because each code is unique): SUMIF(A;A2;LEN(A)).

However the sum of the length for each of these codes is wrong:

SUMIF adds the length of the codes 110/1, 1100/10 and 440/4 together — as well as the length of the codes 130 and 130/1, and the length of the codes 40 and 40/1.

Paul.

Jan 18, 2020 6:04 PM in response to stfflspl

Or perhaps one should say Numbers should not try to interpret a value formatted as Text (I don’t think it actually converts it).


The problem with that is that sometimes I actually WANT Numbers to interpret, as for example when I enter a time as Text instead of Date & Time because I don’t want today’s date attached to it which will mess up matches tomorrow but I still want to do time arithmetic on it (which Numbers will happily do on times entered as Text).


Anyone, I suspect best practices (in both Numbers and Excel) is to avoid special characters in values that will be used for lookups or SUMIFS, etc.


SG


Jan 3, 2020 12:00 PM in response to projectpage

I am having the same issue. Could it be related to date switch to 2020. I had it open on Dec 31 and it worked perfectly. Opened same file again Jan 1 and it showed zeros all over. All my dates are entered with day/month/year formatted as date. Will play with it but not obvious what to change if it worked just fine a few days ago...

Jan 17, 2020 8:56 AM in response to SGIII

In the table below the cells in column A were TEXT formatted before entering the codes.

Six different codes in column A, using COUNTIF in column D and SUMIF in column E.

However:

  • ‘3’ and ‘0003’ are considered identical when using COUNTIF/SUMIF
  • “6-3”, “6/3”, “06/03” and “06/03” are considered identical for COUNTIF/SUMIF





Category does it right.


The same table, adding Category for column A: “Unique Codes (Text Formatted)”

In column D: Count: =1 for all codes, meaning all codes in column A are considered different. 

In column C: Subtotal: = 1, 2, 3, or 5, thus the length of each code individually. 


Paul

Jan 19, 2020 8:08 AM in response to SGIII

"Interpreting" is indeed the correct word in this case.


However Numbers should stop "interpreting" the content of a cell as soon as the cell is formatted, if not set to "Automatic".

e.g. rather than using the Text format for entering Time values, Numbers should stick to its formatting rules:

  • When a cell is formatted as "Date", Numbers should not add (concatenate?) automatically a time on the date (by default the Time should be set to "none").
  • When a cell is formatted as "Time", Numbers should not add (concatenate?) automatically a date on the time (by default the Date should be set to "none").


This approach would make arithmetic on Dates and Times straight forward.


Paul.


Jan 2, 2020 6:28 AM in response to projectpage

Well, the screenshots you provided do not show the same portion of the year, so it is hard to help. Please show a screenshot where the summary (the table "Month by Month") and the table "Expenses" show the same portion of the year so that we can perform manual operations to set expectations about the results.


one comment for the table "Month by Month". You have the month names going across the top of table and category names going to the left side.


adjust your formula to:


1) use those headers

2) be exactly the same


select cell B4 (the same cell you have selected in your screenshot)

=sumifs(Expenses::Amount, Expense, $A4, Month, B$1)


shorthand is:

B4=sumifs(Expenses::Amount, Expense, $A4, Month, B$1)


the "$" in "$A4" forces an absolute column reference (that is no matter where you fill this formula, the reference will also look in column A)


the "$" in "B$1" forces an absolute row reference (that is no matter where you fill this formula, the reference will also look in row 1)


now select cell B4, copy

select cells B2 thru the cell M11, paste




OTHER SUGGESTIONS:

  • make sure the values in column C of the expenses table are formatted as numbers (not text)
  • make sure the categories match between the "Month by Month" and "Expenses" tables

Jan 4, 2020 7:14 AM in response to projectpage

I was puzzled by some of this thread, because in the Data Format dropdown you can format a cell as Automatic OR Text OR Date & Time OR Pop-Up Menu.





After experimenting, I think the trick here, if you want Numbers to recognize the month names in a Pop-Up Menu as Text and not as Date & Time, is to first format cells as Text and add your desired menu choices in those cells. Then select the cells and format them as Pop-Up Menu.


If you want Numbers to recognize the month names in a Pop-Up Menu as Date & Time (which can be useful in some situations but usually not if you are using SUMIF or SUMIFS) then first format the cells as Automatic (not Text). Add the desired menu choices in those cells. Then select the cells and format them as Pop-Up Menu.


SG

Jan 4, 2020 7:55 PM in response to Phaedon2

Hi Phaedon2,


While I am currently using Numbers in Mojave (yea, me), I am wondering if you have tries SG's suggestion that you first format your cells as text before you format them as a popup.


Sometimes Apple takes to improve things in ways that confound our accustomed usasge. Is it possible that they coded popups to remember their previous format? I could imagine an upside if this is the case. I cannot test this on my current setup but if SG states that text converted to popup works where automatic converted to popup fails it is worth your time to test it out.


My 2¢ from the sidelines.


quinn

Jan 20, 2020 1:21 AM in response to SGIII

From the Numbers User Guide for Mac:




Date and time




Numbers automatically interprets text strings that you type in a recognised date format as dates (for example, 10/06/17).


  1. Select the cells you want to format.
  2. In the Format 
  3.  sidebar, click the Cell tab, then click the Data Format pop-up menu and choose Date & Time.
  4. Click the Date pop-up menu, then choose a format.
  5. If you choose None, no date is displayed in the cell, even if a date is entered and used in date and time calculations.
  6. Choose a format from the Time pop-up menu.

  7. If you choose None, no time is displayed in the cell, even if a time is entered and used in date and time calculations.


If you don’t enter both a date and a time, Numbers adds a default value for you. For example, if you type “1:15 pm”, Numbers adds today’s date by default.


— — — — 


“If you don’t enter both a date and a time, Numbers adds a default value for you.”


Suggestion: Numbers should not add anything at all and stick to the chosen format: “None” = “None”.


Paul.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

SUMIFS Not Working

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.