Solved

Summing some of the values in a table in Excel.

Posted on 2011-03-22
6
260 Views
Last Modified: 2012-05-11
Hello,

Suppose you have a table of values in an Excel (2007) spreadsheet which is 10 columns wide and many rows in length (say A3:J5000).  Furthermore, suppose that column B has only three possible entries:  D, C and W.  In other words, none of the entries in column B is unique.

Now suppose that for a specified range in the table, you want to use =SUM() to add-up all the values (but only the values) in column G which have a "D" in column B.  What formula would do that?

I am familiar with using =LOOKUP() to locate values in a list or table.  However, I believe that =LOOKUP() is only usable when all values in the lookup column are unique.  Is that correct?

If so, then here, I am looking for a function in which those values do not have to be unique.

Thanks
0
Comment
Question by:Steve_Brady
6 Comments
 
LVL 50

Accepted Solution

by:
barry houdini earned 500 total points
ID: 35191567
Hello Steve

Sounds like you'd want SUMIF, so for the whole table

=SUMIF(B3:B5000,"D",G3:G5000)

regards, barry
0
 
LVL 29

Expert Comment

by:gowflow
ID: 35191569
=COUNTIF(G1:G5000,"D")

gowflow
0
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 35191577
first question: =SUMIF() would do that.
second question: not necessarily unique, but lookup will only bring one result, the first one it finds.

:)
0
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
LVL 7

Expert Comment

by:harr22
ID: 35191586
=SUMIF(B1:B5000,"D",G1:G5000)
0
 
LVL 29

Expert Comment

by:gowflow
ID: 35191619
pls ignore my previous post barryhoudini your correct.
gowflow
0
 

Author Closing Comment

by:Steve_Brady
ID: 35420677
Thanks Barry!
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

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