List out duplicate items in a list with different costs/values

H3MSY

Board Regular
Joined
Apr 29, 2002
Messages
72
Office Version
  1. 365
Platform
  1. Windows
Hi all, I've used the search function but i cant find an answer , hopefully this is a simple one.

I work on collating costs and prices for projects made up of thousands of items. The problem i come up against is different costs are given to me by different groups feeding into me for the same part number.

For ease of explanation, lets say I have two columns on my main data input sheet, a list of part numbers with a cost alongside. (Column A & B)

Is there a way (pivot table? / Formula? on a separate tab), that if there are duplicate part numbers with different a cost to list that part number and the different costs that are against that part number so i can then go into the list on the data tab filter by that part number and change the wrong cost.

Thanks in advance for any help.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
You could add two columns:

Cell C1 should be:

Excel Formula:
=INDEX(UNIQUE(A:B),,1)


And cell D1 should be:

Excel Formula:
=LET(tbl,CHOOSE({1,2},UNIQUE(A:A),COUNTIF(C1#,UNIQUE(A:A))),INDEX(FILTER(tbl,INDEX(tbl,,2)=2),,1))
 
Upvote 1
Hi H3MSY,
I suggest you create :
1. a 1st column dedicated to the part number (using left function potentially combined with search/find if there is a specific sign between the two;
2. a 2nd column counting the occurrence of each sku
3. filter all our columns including these 2 above
4. select the occurrences above 1
5. The list of part number with multiple values now appears so you can have a look and make a decision on the one to delete
 
Upvote 0
Try:
varios 24sep2024.xlsm
ABC
1PartPriceDup
2AAA12323Dup
3BB345634Dup
4CC789045 
5AAA12323Dup
6BB345634Dup
7CC789045 
8AAA12367Dup
9BB345678Dup
10CC789045 
Hoja2
Cell Formulas
RangeFormula
C2:C10C2=IF(COUNTIFS(A:A,A2,B:B,"<>"&B2),"Dup","")
Named Ranges
NameRefers ToCells
_FilterDatabase=Hoja2!$A$1:$C$10C2:C10


After filtering column C by the values equal to "Dup", and you will have the parts with different prices
 
Upvote 1
Or you can use the following to obtain duplicates with a different price, formula in E2.

Excel Formula:
=LET(a,A2:A10,b,B2:B10,c,A2:B10,SORT(IF(BYROW(c,LAMBDA(br,COUNTIFS(a,CHOOSECOLS(br,1),b,"<>"&CHOOSECOLS(br,2))))>0,c,""),1,-1))

Ex:
1727194217310.png
 
Upvote 1
Try:
varios 24sep2024.xlsm
ABC
1PartPriceDup
2AAA12323Dup
3BB345634Dup
4CC789045 
5AAA12323Dup
6BB345634Dup
7CC789045 
8AAA12367Dup
9BB345678Dup
10CC789045 
Hoja2
Cell Formulas
RangeFormula
C2:C10C2=IF(COUNTIFS(A:A,A2,B:B,"<>"&B2),"Dup","")
Named Ranges
NameRefers ToCells
_FilterDatabase=Hoja2!$A$1:$C$10C2:C10


After filtering column C by the values equal to "Dup", and you will have the parts with different prices
Many thanks for this method.. filtering by "dup" is an option but my datasheet is maybe 50 columns wide so filtering can get cumbersome. What i would like is a simple table on another tab that would just summarise any duplicates like this...
 

Attachments

  • Dulpicates.png
    Dulpicates.png
    4 KB · Views: 3
Upvote 0
Or you can use the following to obtain duplicates with a different price, formula in E2.

Excel Formula:
=LET(a,A2:A10,b,B2:B10,c,A2:B10,SORT(IF(BYROW(c,LAMBDA(br,COUNTIFS(a,CHOOSECOLS(br,1),b,"<>"&CHOOSECOLS(br,2))))>0,c,""),1,-1))

Ex:
View attachment 117251
that could work!!! ignore my reply to your initial post, I think our posts crossed! I'll give this a try now. Thanks for your help
 
Upvote 0

Forum statistics

Threads
1,223,879
Messages
6,175,142
Members
452,615
Latest member
bogeys2birdies

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