Link to home
Start Free TrialLog in
Avatar of Jess31
Jess31

asked on

Excel Sum() ?

How can I sum a column based on the value of the column next to it. Let me explain:
Column A contains a number, and I want to sum column A1 to A100, but only for those cells where the corresponding B column contains an 'X'. So if B1 contains X then A1 would be part of the sum if B1 does not contain an X then A1 is skipped. And this would be so for each row.
ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
=SUMIF(A1:B7,1,B2:B7)


a      b
1      0
2      2
3      0
4      0
5      3
6      1
      
      
      
2      
sorry its =sumif(A1:A8,1,B2:B7)