I would be very grateful if somebody could help me out with this.
Column A has a list of items where some items occur more than once, and column B has a value for each item.
I want column C to show the same information as column B, except add the values for the duplicates in column A together, like so:
A. B. C
a 10 25
b 10 10
a 15 25
c 10 10
d 10 10
Hi,
Try this in C1 and copy down
=SUMPRODUCT(--($A$1:$A$100=A1)*(--(B$1:$B$100)))
oldchippy
-------------
![]()
![]()
If you are happy with the help you have received, please click the blue scales icon in the blue bar of the post.
Click here >>> Top Excel links for beginners to Experts
Forum Rules >>>Please don't forget to read these
Works like a charm! Thank you!
hi,
An alternative is to copy the below down in column C as needed:
=SUMIF($A$1:$A$100,$A1,$B1:$B$100)
OldChippy, I was just just wandering through the day's posts & when I spotted this one I became curious... is there an advantage to using Sumproduct over Sumif in this case?
Rob
Rob Brockett
Kiwi in the UK
Always learning & the best way to learn is to experience...
Hi,... is there an advantage to using Sumproduct over Sumif in this case?
It was just the first solution that came into my head when I read the questionCan't think of any reason why one is better than the other.
oldchippy
-------------
![]()
![]()
If you are happy with the help you have received, please click the blue scales icon in the blue bar of the post.
Click here >>> Top Excel links for beginners to Experts
Forum Rules >>>Please don't forget to read these
ahhh, yep that makes sense - I have a few of those solutions at work where it is "6 of one, 1/2 a dozen of the other".
Rob
Rob Brockett
Kiwi in the UK
Always learning & the best way to learn is to experience...
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks