# E1 | anthropic/claude-haiku-4.5 | 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

Here's the formula you need:

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

This formula scans all of column A for cells containing "Paid" and sums the corresponding values in column B.

**How it works:**
- **A:A** — The range to search (column A)
- **"Paid"** — The criteria to match
- **B:B** — The range to sum (column B)

**Alternative syntax for Google Sheets or Excel:**

```excel
=SUMIF(A2:A1000,"Paid",B2:B1000)
```

Use this version if you want to specify exact row ranges instead of entire columns. This is slightly more efficient for large datasets.

**Case sensitivity:** The formula is case-insensitive, so "paid", "PAID", and "Paid" all match.

**With partial matches** (if you need to match cells containing "Paid" plus other text):

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

The asterisks act as wildcards.

Do you need to filter by multiple criteria or sum based on conditions from different columns?
