# E1 | x-ai/grok-4.3 | run 1

## Prompt

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

## Response

The SUMIF function sums values from column B where column A matches the criterion "Paid" and works identically in both Excel and Google Sheets.

## Recommended Formula
```
=SUMIF(A:A, "Paid", B:B)
```

## How It Works
SUMIF checks each cell in the first range (column A) against the given criterion. It adds the corresponding value from the sum range (column B) only when a match occurs. Use specific row ranges such as A2:A1000 instead of full columns when headers or large datasets exist to improve performance.

## Alternative for Multiple Criteria
```
=SUMIFS(B:B, A:A, "Paid")
```
SUMIFS supports adding more conditions if needed later.

Would you like a version that handles case-insensitive matching or dynamic named ranges?
