Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
Solved

# Excel Sum() ?

Posted on 2011-09-07
Medium Priority
285 Views
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.
0
Question by:Jess31
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 2

LVL 93

Accepted Solution

Patrick Matthews earned 2000 total points
ID: 36500520
Use SUMIF:

=SUMIF(B1:B100,"X",A1:A100)
0

LVL 16

Expert Comment

ID: 36500527
=SUMIF(A1:B7,1,B2:B7)

a      b
1      0
2      2
3      0
4      0
5      3
6      1

2
0

LVL 16

Expert Comment

ID: 36500537
sorry its =sumif(A1:A8,1,B2:B7)
0

## Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to create pivot charts out of a data set. I also added a drop-down menu which allows to choose from different categories in the data set and the chart will automatically update.
###### Suggested Courses
Course of the Month11 days, 18 hours left to enroll