Sum numbers by text category in Numbers?

I have two columns in Numbers, the first is numeric the second is text. I want to create a formula that will add the numbers in the first column that correspond to a particular value in the second column. The sumifs function does not seem to like vector (column) arguments, so I would have to enter each entry in column 2, one after another. I could use categories to rearrange numbers, and the sum a range of rows, but I would still need to manually select each range to calculate the sum. Is there not a function to compute subtotals of categories?

iMac 24″, macOS 26.4

Posted on Jul 4, 2026 12:13 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 4, 2026 12:51 PM

The SUMIF function (not the SUMIFS - plural - function) would seem appropriate for your data. Here is an example:



(Cell C3 is similar to Cell C2 but sums up for “B”.)

6 replies

Jul 7, 2026 4:35 PM in response to Mikelis Bickis

Another way to get the individual sums and the grand total would be to create a pivot table (Create a pivot table in Numbers on Mac - Apple Support).


Using the same table as my earlier example, here is what the pivot table would look like (the pivot table is added to a new sheet):



As opposed to using the SUMIF and SUM functions, which are automatic, if you update the source data in the original table, you need to refresh the pivot table to see the changes.

Jul 7, 2026 4:23 PM in response to Yellowbox

Thanks. That works. I guess the trick is to put the grand total in a "footer row". Still seems strange that there isn't a more automatic way to create subtotals and a grand total. It's not as if my intent is to do something unusual. Indeed, if I have two categories, Numbers gives me the subtotal for a single category, and then breaks it down by subcategory. It would be easy to have a default null category that would give a grand total.

Sum numbers by text category in Numbers?

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