Solved

Excel Sum() ?

Posted on 2011-09-07
3
276 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
ID: 36500520
Use SUMIF:

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

Expert Comment

by:santoshmotwani
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

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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Macro that Locks & Unlocks Worksheet 4 27
Checking references in VBA 3 22
Copy entire column 6 22
I need macro to insert an character 8 18
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

740 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