Match Cells, and Sum Data

M

Mik

Hello,

Hoping that someone out there can help this newbie with a problem.

I have a spreadsheet, where Column A shows a number which could be
duplicated further down the sheet.
The number of times this is duplicated may be as many as 5 times
(max).

What i would like, is to SUM the values in column B, where the Numbers
in Column A match, and show the result in column C.
See the example below:-
Number 1 appears 3 times, and the sum of Column B for each of these
number 1 inputs is 20.

eg.
Col A Col B ColC
1 10 20
1 5 20
1 5 20
2 20 30
2 10 30
3 5 5
4 42 42
etc..

Can anybody please help?

Thanks in advance.
Mike
 
B

Bernard Liengme

=SUMIF(A1:A100,1,B1:B100)
will sum all the B cells which have corrsponding A cell values of 1
Looking at you example:
=SUMIF($A$1:$A$100,C1,$B$1:$B$100)
entered in C1 and copied down the column
Of course, you will need to adjust the A1:A100 range
best wishes
 
M

Mik

=SUMIF(A1:A100,1,B1:B100)
will sum all the B cells which have corrsponding A cell values of 1
Looking at you example:
=SUMIF($A$1:$A$100,C1,$B$1:$B$100)
entered in C1 and copied down the column
Of course, you will need to adjust the A1:A100 range
best wishes
--
Bernard V Liengme
Microsoft Excel MVPwww.stfx.ca/people/bliengme
remove caps from email












- Show quoted text


Bernard,

I thank you very much.

Just the trick..

Mike
 

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