Totalling Values Specifically Identified

M

Mike L.

I have two (2) columns. The first column gives a numeric
identifier, such as: 4, 7, 14, 23. The second column
gives a dollar value associated with the identifier in
that row. Below is an example:

4 $5.16
14 $3.45
7 $6.56
23 $3.23
14 $7.87
4 $5.34
7 $2.12
23 $3.54

In separate cells I want to be able to sum all values
associated with a specific identifier. For example, the
total for all values associated with 4 ($5.16 + $5.34);
the total for all values associated with 23 ($3.23 +
$3.54); the total for all values assocated with 7 ($6.56
+ $2.12); etc.

What is the formula, function or macro? Thanks
 
M

Max

One way is to use SUMIF

Assume the sample data is in Sheet1, A1:B8

In Sheet2
-------------
You have the numeric identifiers (4, 14, etc)
listed in A2 down

Put in B2:
=SUMIF(Sheet1!$A$1:$A$8,A2,Sheet1!$B$1:$B$8)

Copy down
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top