Suming duplicate values

dmajcan

New Member
Joined
Jan 9, 2017
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hello there.

I've been lurking MrExcel for quite some time, and you guys helped me so much ( unfortunately my excel skills are not good enough to return the favor ). Now I have a problem for which I can't find an answer.

The sheet has approx 4500 rows, with 300-400 values that are duplicated ( some 10, some 15-20 times ), I need to count column D for each value.

I started doing it by hand, sorted sheet by column C and insert a blank row behind each value, and SUM it up ( rows 17 and 27 ) but there must be a faster way to do it.

Thank you in advance for your help

mrexcel-problem2.jpg
 
Last edited by a moderator:
As I said from the original post

and the image clearly shows the sums NOT the counts.
I suspect that post#4 is just a problem with translation
Maybe it's so. But I'm still not clear, out from the picture, because it seems as he collect the same number from the whole range, and sum these counts.
And in my proposal in #3, it will also give him a total (Sum), as it count all the same values in the Range. Similar to what he did in the image he show, where he separated them up, and then sum these, afterwards. I just made a list of all values, and the amount (sum) of these.
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Your proposal in post#3 does not give a sum, just a count.
But we will have to wait on the OP for confirmation of what is required.
 
Upvote 0
If you are wanting to sum the totals and remove the duplicate rows, I think your best bet would be to use a pivot table. With Toadstool example, you would have a pivot table like the example below.

More StuffKey to COUNT or SUMSum of Stuff
CatCatty
84​
DogDoggy
14​
GoatGoaty
6​
SheepSheepy
15​
Grand Total
119​
 
Upvote 0
Thanks for your answers. sorry once again for not being clear.

I need SUM of column D, for all same ( duplicate ) values in column C.

Row 17 is what I need ( it's the sum of all 3858889290619 values in column D ), or Row 27 which is the sum of all 3858889290626 values in column D, these two rows I added manually and summed them up, but since there are 4500 rows and about 400 different values in C, it might take some time to do it manually.

@Fluff, thanks for your remark, I added office information in my account information
 
Upvote 0
Thanks for updating your profile.
How about something like
+Fluff 1.xlsm
ABCDEFG
1DistrictWardCountyPopulation
2Staffordshire MoorlandsChurnetStaffordshire8Staffordshire100
3StroudBisleyStaffordshire92West Yorkshire179
4BradfordWibseyWest Yorkshire24Derbyshire37
5DudleySedgleyDerbyshire37West Midlands147
6RichmondshireSwaledaleWest Midlands38County Durham25
7BirminghamQuintonCounty Durham10Devon20
8County DurhamEsh and Witton GilbertDevon20North Yorkshire11
9West DevonDrewsteigntonWest Yorkshire2Surrey168
10LeedsGuiseley and RawdonNorth Yorkshire6South Yorkshire33
11HarrogateWashburnWest Yorkshire15Lancashire198
12BradfordClayton and Fairweather GreenSurrey44Dorset3
13TandridgeTatsfield and TitseyNorth Yorkshire5Somerset5
14Derbyshire DalesHullandWest Yorkshire60Greater Manchester32
15CravenIngleton and ClaphamSurrey124Hampshire13
16KirkleesLindleySouth Yorkshire30Cornwall9
17Mole ValleyBox Hill and HeadleyLancashire77
18SheffieldCrookes and CrosspoolWest Yorkshire1
19Cannock ChaseRawnsleyCounty Durham13
20PendleBrierfieldWest Midlands109
21BradfordWorth ValleyCounty Durham2
22County DurhamEvenwoodDorset3
23BirminghamLongbridgeSouth Yorkshire3
24County DurhamConsett NorthSomerset5
25West DorsetMaiden NewtonLancashire91
26Forest of DeanCinderford EastWest Yorkshire77
27SheffieldPark and ArbourthorneGreater Manchester32
28Taunton DeaneBlackdownLancashire30
29RossendaleLongholmeHampshire13
30BradfordBolton and UndercliffeCornwall9
Main
Cell Formulas
RangeFormula
F2:F16F2=UNIQUE(FILTER(C2:C9990,C2:C9990<>""))
G2:G16G2=SUMIFS(D:D,C:C,F2#)
Dynamic array formulas.
 
Upvote 0
@Fluff ?‍?, awesome, it worked. Thank you so much.

Do you have a suggestion for renaming this topic so other users can find this solution more easily?

Thanks once again, you saved me few hours of work

Best Regards
 
Upvote 0
Glad we could help & thanks for the feedback.
I have changed the title as well.
 
Upvote 0

Forum statistics

Threads
1,214,971
Messages
6,122,520
Members
449,088
Latest member
RandomExceller01

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top