I have a simple spreadsheet, two columns "Amount" (col Q) and "Account" (col O). I want to get the sum of the "Amount" column where the corresponding "Account" forum equals "Paypal".

This is as far as I can get!

```
=SUM(Q:Q)*(O:O="Paypal")
```

3

I have a simple spreadsheet, two columns "Amount" (col Q) and "Account" (col O). I want to get the sum of the "Amount" column where the corresponding "Account" forum equals "Paypal".

This is as far as I can get!

```
=SUM(Q:Q)*(O:O="Paypal")
```

10

I believe rather than using `SUM()`

you want the `SUMIF()`

function. I don't have Excel to hand but I believe you need your formula to be

```
=SUMIF(O:O,"Paypal",Q:Q)
```

From this site

The syntax for the SumIf function is:

`SumIf( range, criteria, sumRange )`

rangeis the range of cells that you want to apply the criteria against. (your column containing "Paypal"

criteriais used to determine which cells to add. - In your case matching "paypal"

sumRangeare the cells to sum.

Also see this Microsoft help page, and this page which has some more advanced functions such as DSUM and SUMPRODUCT.

`=SUM(Q:Q*(O:O="Paypal"))`

, and committed it using Ctrl+Shift+Enter. – Ellesa Oct 10 '11 at 21:18`SUMIF`

. Array formulae seem to work on the whole column (down to row 1048576), so if you need to use them, it's best to use a more limited range (e.g.`Q2:Q2000`

). – benshepherd Sep 17 '13 at 9:26