Subtotals in Categories with decimals

Hi,

I have a table with categories. The maximum and count settings work fine with it, but the subtotal returns 0. I figured out that it’s happening because numbers I want added together are not whole numbers. Is there a way to get the the subtotal of a category that has decimals? Thanks for any help.

Posted on Feb 7, 2021 12:29 AM

Reply
Question marked as Top-ranking reply

Posted on Feb 7, 2021 1:30 AM

Shouldn't make any difference. Numbers with decimals are still numbers, and should total normally.


Are you sure the values in the column being subtotalled are "numbers" and not "text"?


An easy way to check this is to insert a temporary column beside the column holding the 'numbers' then enter a formula into the new column that gets the value from the cell and adds 1 to it, using the addition operator ( + ). If the addition works, the value in the column is a number; if not, it is not a number. Fic the values in any cells where the addition causes an error message, then delete the temporary column.


Regards,

Barry

Similar questions

5 replies
Question marked as Top-ranking reply

Feb 7, 2021 1:30 AM in response to Circleof05ths

Shouldn't make any difference. Numbers with decimals are still numbers, and should total normally.


Are you sure the values in the column being subtotalled are "numbers" and not "text"?


An easy way to check this is to insert a temporary column beside the column holding the 'numbers' then enter a formula into the new column that gets the value from the cell and adds 1 to it, using the addition operator ( + ). If the addition works, the value in the column is a number; if not, it is not a number. Fic the values in any cells where the addition causes an error message, then delete the temporary column.


Regards,

Barry

Feb 7, 2021 5:29 AM in response to Circleof05ths

Barry's guess that your numbers are actually text, not numbers, is probably correct. They may look like numbers to you and me and to the + - * / operators but most numeric functions will ignore them as text. It is interesting that categories Maximum accepts textual numbers but Subtotal does not. I tried it out and that is, in fact, the case. Either the cells that contain the numbers are formatted as text or the numbers themselves have some problem such as using a comma for the decimal when your system settings say it should be a point.


A quick test is to turn off categories, select that column of numbers, and look at the bottom of the window at the value given for Sum, Max, Min, etc. If those values look wrong, you probably have a problem. Or select a cell that you think is a problem and see what it says in the bottom left corner of the window. If it says "actual" it is a number (or a date). If it says "text" it is text. You can go down your entire column that way if it isn't too long.


If your column is really long, temporarily create a new column B. Assuming your first data row is row 2, in cell B2 put the formula =COUNT(A2). Fill down to the rest of the rows. Any row that has an actual number (or a date) will get a 1. Any rows that have text will get a zero.


If there is no problem with your numbers, they are just formatted as text, select the cells/column and change the cell format to a numeric format. You might try that as the first step, actually, before doing anything else. Typically, numbers should be numbers when you enter them in the cell unless you have formatted the cell as text or there is a problem with the number itself, making it not a number.


Feb 7, 2021 9:31 AM in response to Circleof05ths

Select all those cells and change the format to Number. After that, click elsewhere to deselect those cells then select them all again to see if the format change stuck. If the cell format is "number" then they are all numbers now. If it is "multiple" or "text" or "automatic", one or more are still messed up and it is probably because they are not numbers according to your system preferences. They may have a comma for the decimal separator when it should be a period, they may have spaces for the thousands separators instead of commas, or something else. If you need help figuring out what is wrong with a particular cell, post a screenshot of it here and we'll try to figure it out.


If the numbers are the result of formulas, it could be the formula or it could be the cells referenced in the formula that are causing the result to be text. For example,

=IF(C2=TRUE,"1",2)

will result in 1 (as text) or the 2 (as a number)


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.

Subtotals in Categories with decimals

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