*37*

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:

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