# E1 | perplexity/sonar-pro | run 2

## Prompt

Write a spreadsheet formula (Excel/Sheets) that sums all values in column B where the matching cell in column A equals 'Paid'.

## Response

Use a **SUMIF** (or **SUMIFS**) formula that tests column A for "Paid" and sums the corresponding values in column B.

For the entire columns, you can use either of these:

```excel
=SUMIF(A:A, "Paid", B:B)
```

or

```excel
=SUMIFS(B:B, A:A, "Paid")
```

Both formulas check each cell in **column A** for the text **"Paid"** and add the matching values from **column B**.[SUMIF example](https://excelperfect.com/formulas/how-to-use-sumif-in-excel/)[StackOverflow example](https://stackoverflow.com/questions/56097241/calculating-sum-in-excel-for-select-values)[Microsoft SUMIFS](https://support.microsoft.com/en-us/office/sum-values-based-on-multiple-conditions-e610ae0f-4d27-480c-9119-eb644f1e847e)

Would you like the formula scoped to a specific row range instead of whole columns (e.g., A2:A100 and B2:B100)?
