Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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")
share|improve this question
    
Your above formula would would if you wrote it this way: =SUM(Q:Q*(O:O="Paypal")), and committed it using Ctrl+Shift+Enter. –  Ellesa Oct 10 '11 at 21:18
    
That works but it will be super-slow compared with 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

1 Answer 1

up vote 7 down vote accepted

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 )

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

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

sumRange are the cells to sum.

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.