3.1 C
London
Friday, December 20, 2024
HomeSoftware TutorialsGoogle SheetsGoogle Sheets: How to Sum If Checkbox is Checked

Google Sheets: How to Sum If Checkbox is Checked

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following formula to sum values in Google Sheets if a corresponding checkbox is checked:

=SUM(ARRAYFORMULA(A2:A11*B2:B11))

This particular formula assumes that the values are in the range A2:A11 and the checkboxes are in the range B2:B11.

The following example shows how to use this formula in practice.

Example: Sum If Checkbox is Checked in Google Sheets

Suppose we have the following dataset in Google Sheets:

Note: You can add checkboxes to a range of cells by selecting a range, then clicking the Insert tab, then clicking Checkbox.

We can use the following formula to sum only the values in column A where the corresponding checkbox in column B is checked:

=SUM(ARRAYFORMULA(A2:A11*B2:B11))

The following screenshot shows how to use this formula in practice:

Google Sheets sum if checkbox is checked

The sum of the values in column A where the corresponding checkbox in column B is checked is 172.

We can confirm this is correct by manually calculating the sum of the values in column A where the corresponding checkbox in column B is checked:

Sum of Checked Checkboxes: 20 + 29 + 26 + 31 + 51 + 15 = 172

This matches the value that we calculated using the formula.

Additional Resources

The following tutorials explain how to perform other common operations in Google Sheets:

How to Use SUMIF Contains in Google Sheets
How to Use SUMIF with OR in Google Sheets
How to Create a Cumulative Sum Chart in Google Sheets

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories