I have a long list of names of products and numbers of those products, I want to combine all the duplicate entries and add their numbers. So if I have 2 entries for Widget X, and each entry has 3 products, then I want to combine this to one entry for Widget X with 6 products.
I've sorted the list out and summed them for each product but I just used a sum function, I felt there must be a formula that uses an IF statement to detect entries that equal each other and then sum their respective quantity lines but I can't figure it out.
What i'm trying to get is IF (any field in column A = 3792 , then sum all its associated quantity fields in column C)
Does anyone have any ideas?
3792 Widget A 1
3792 Widget A 1
3792 Widget A 1
3792 Widget A 1
3792 Widget A 1
3792 Widget A 2
3792 Widget A 1
3805 Widget B 1
3805 Widget B 1
3806 Widget C 8
3823 Widget D 895
3823 Widget D 1
3823 Widget D 20
3892 Widget E 2
3892 Widget E 1
3892 Widget E 1
Use the sumif function. See this blog for an explanation.
Assuming the values started in A1, paste this function into D1 and copy to D1-D16 to get sums for each field (there would of course be duplicates)
=SUMIF(A$1:A$16,A1,C$1:C$16)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With