You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Only add numbers in a colum with an associated check mark

I have a column of numbers (column B) that have prices in it. I can easily enough create a cell under this column that will add all of these together. However, I have a column A next to these numbers and only a few of these cells in this column have a check mark in them. I only want to add up the numbers in column B that have an associated check mark next to them. How do I create this formula?


Many thanks,

Houston

Posted on Nov 20, 2021 12:36 PM

Reply
Question marked as Top-ranking reply

Posted on Nov 20, 2021 12:44 PM

You'll want to use SUMIF


SUMIF(F2:F12,"x",G2:G12) this looks at the cells in column F that have a "X" and then sums the corresponding checked cells from column G.


If you're using a checkbox, it might be a "1" for check and a "0" for unchecked.

4 replies

Nov 20, 2021 5:41 PM in response to htown

muguy has the right function and a correct formula.

These are some additional comments, and a version of the formula that takes advantage of some features of Numbers.


Cells in Numbers with their Data Format set to Checkbox contain one of two boolean values:

true if checked, false if not checked.

The SUM functions (SUM, SUMIF, SUMIFS) and several similar functions omit cells in header rows and footer rows of 'full column' references.


With that in mind, the formula in the example below works well for your purpose:

The formula shown is in the selected cell, B11. Row 11 is set to be a Footer row, avoiding the self reference error that would occur if this were a normal 'body' row.


When entering the formula, do not enclose true in quotation marks. The Boolean value should appear as shown, even if you type TRUE in the space shown.


A and B are 'full column references for columns A (containing the test values) and B (containing the values to be summed). Note that neither the cells in row 1 (a Header Row) or Row 11 (a Footer row) are highlighted to match the lozenges containing the column references in the formula, indicating the column reference does not include these cells.


If rows are added to or removed from the table, those rows will be placed between the Header row(s) and the Footer row(s), and will be automatically included in (or removed from) the formula.


Regards,

Barry

Only add numbers in a colum with an associated check mark

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