Solved

Excel Sum() ?

Posted on 2011-09-07
3
247 Views
Last Modified: 2012-05-12
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
Comment
Question by:Jess31
  • 2
3 Comments
 
LVL 92

Accepted Solution

by:
Patrick Matthews earned 500 total points
Comment Utility
Use SUMIF:

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

Expert Comment

by:santoshmotwani
Comment Utility
=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

by:santoshmotwani
Comment Utility
sorry its =sumif(A1:A8,1,B2:B7)
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Introduction While answering a recent question (http:/Q_27311462.html), I created an alternative function to the Excel Concatenate() function that you might find useful.  I tested several solutions and share the results in this article as well as t…
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now