Counting Duplicates

Dallan1361

New Member
Joined
May 24, 2024
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi all - thanks in advance for any help given it is much appreciated

I have a large dataset c.100,000 rows. It is essentially looking at costs of items and expenditure. Here is a mock-up of what I am working with to give a picture:

CountryHoliday ProductCost
SpainSnorkelling £50
SpainBooze cruise£25
FranceSnorkelling£50
FranceVolleyball £10
FranceSnorkelling£50
FranceGuided Tour£15
GermanyGuided Tour£15
GermanyGuided Tour£15
GermanyBooze cruise£25


Apologies in advance if I am massively over-complicating this, but ideally I want something that will manipulate the data into something like the below and highlight frequency of duplicates in each Country

CountryHoliday ProductCostFrequency
SpainSnorkelling£501
SpainBooze cruise£251
FranceSnorkelling£1002
FranceVolleyball£101
FranceGuided Tour£151
GermanyGuided Tour£302
GermanyBooze cruise£251

I have this thanks to another user, 'Fluff', which will populate the first 3 columns :
'=LET(u,UNIQUE(FILTER(A2:B10000,A2:A10000<>"")),HSTACK(u,SUMIFS(C:C,A:A,INDEX(u,,1),B:B,INDEX(u,,2))))

So I would be looking for something that will populate the frequency column by each country, i.e. Snorkelling appears 1 time in Spain and 2 in France, not 3 times total

Thank you in advance
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
How about
Excel Formula:
=LET(u,UNIQUE(FILTER(A2:B10000,A2:A10000<>"")),HSTACK(u,SUMIFS(C:C,A:A,INDEX(u,,1),B:B,INDEX(u,,2)),COUNTIFS(A:A,INDEX(u,,1),B:B,INDEX(u,,2))))
 
Upvote 0
Solution
You can use the Pivot table.
1718207871325.png
 
Upvote 0
How about
Excel Formula:
=LET(u,UNIQUE(FILTER(A2:B10000,A2:A10000<>"")),HSTACK(u,SUMIFS(C:C,A:A,INDEX(u,,1),B:B,INDEX(u,,2)),COUNTIFS(A:A,INDEX(u,,1),B:B,INDEX(u,,2))))
Amazingly helpful once again, thank you very much!
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 1

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

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