Duplicates, find values from other columns

Cervani

New Member
Joined
Jun 22, 2022
Messages
22
Office Version
  1. 365
Platform
  1. Windows
Hi,
I would say this one is tricky (I believe) so I appreciate any comments, including that it's not worthy to even try.

I have an extract in excel - 1k rows, 40 columns. For illustration purpose I will include just 5.

1657820064721.png






Category column has duplicates as
CEP_Clothes
Sold from values are different

and
ORC_Jeans
Reporting Included , Type , Sold from are different

I highlighted them in yellow.

Category should be distinct, so I need to review all and check why they were duplicated.

Is there is way to do it automatically? Instead of conditional formatting and scrolling to the right, to find different values in other columns?
In other words to have VBA code extracting this to new tab

1657820341989.png


and this to another

1657820362711.png



Thanks for any advice.

Table included below.


CategoryIn StockReporting IncludedTypeSizeSold from
CEP_ClothesYesYesSportsAdult8/31/22
CEP_ClothesYesYesSportsAdult8/30/22
DDP_ShoesNoYesAdultN/A
ORC_JeansNoYesAdult4/1/22
ORC_JeansNoNoMenAdult8/30/22
ORC_JeansNoYesMenAdult8/30/22
ORC_ShoesYesYesmove to womenAdult
DDP_JeansYesYes
 

Attachments

  • 1657819157985.png
    1657819157985.png
    18 KB · Views: 4
  • 1657820044824.png
    1657820044824.png
    17.9 KB · Views: 2

Excel Facts

Does the VLOOKUP table have to be sorted?
No! when you are using an exact match, the VLOOKUP table can be in any order. Best-selling items at the top is actually the best.
With Excel 365, you don't even need VBA. There's a simple formula to do what you want:

Book1
ABCDEFGHIJKLMNO
1CategoryIn StockReporting IncludedTypeSizeSold from Category:In StockReporting IncludedTypeSizeSold from
2CEP_ClothesYesYesSportsAdult8/31/2022 ORC_JeansORC_JeansNoYes0Adult4/1/2022
3CEP_ClothesYesYesSportsAdult8/30/2022 ORC_JeansNoNoMenAdult8/30/2022
4DDP_ShoesNoYesAdultN/A ORC_JeansNoYesMenAdult8/30/2022
5ORC_JeansNoYesAdult4/1/2022
6ORC_JeansNoNoMenAdult8/30/2022
7ORC_JeansNoYesMenAdult8/30/2022
8ORC_ShoesYesYesmove to womenAdult
9DDP_JeansYesYes
10
Sheet3
Cell Formulas
RangeFormula
J2:O4J2=FILTER(A2:F10,A2:A10=I2)
Dynamic array formulas.
 
Upvote 0
Doing that manually takes few hrs.

Let's put it this way.
I need to find a reason why category is duplicated.

The reason I have 2x CEP_Clothes is field "Sold from" - there are different values, it's easy to spot on my example.

But what if I have 8 x ORC_Jeans rows, it means that at least 8 columns
have different values ( out of 40 columns)

It's terribly tiring to select first set of duplicates
and look at all columns to find discrepancies . And then next and next. It can be 60 sets of duplicates.
 
Upvote 0
Oh, I see, you only want to show the columns that have differences. Try this:

Book1
ABCDEFGHIJKL
1CategoryIn StockReporting IncludedTypeSizeSold from Category:Reporting IncludedTypeSold from
2CEP_ClothesYesYesSportsAdult8/31/2022 ORC_JeansYes1/0/19004/1/2022
3CEP_ClothesYesYesSportsAdult8/30/2022 NoMen8/30/2022
4DDP_ShoesNoYesAdultN/A YesMen8/30/2022
5ORC_JeansNoYesAdult4/1/2022
6ORC_JeansNoNoMenAdult8/30/2022
7ORC_JeansNoYesMenAdult8/30/2022
8ORC_ShoesYesYesmove to womenAdult
9DDP_JeansYesYes
10
Sheet3
Cell Formulas
RangeFormula
J1:L4J1=LET(t,FILTER(B1:F10,(A1:A10=I2)+(A1:A10="Category")),r,ROWS(t),tf,t=INDEX(t,2,0),m,MMULT(SEQUENCE(,r,,0),tf+0),FILTER(t,m<r-1))
Dynamic array formulas.


The biggest issue is that I had to format all the columns J:Z (or whatever) as a date format, otherwise you'd just get the number value. This could cause a problem with some other values (like K2 here). But this can be easily remedied with Conditional Formatting. We can set up a rule that looks for certain headings (like "Sold from") and format that with a date, otherwise we'd just leave the standard General format.
 
Upvote 0
Solution
Oh, I see, you only want to show the columns that have differences. Try this:

Book1
ABCDEFGHIJKL
1CategoryIn StockReporting IncludedTypeSizeSold from Category:Reporting IncludedTypeSold from
2CEP_ClothesYesYesSportsAdult8/31/2022 ORC_JeansYes1/0/19004/1/2022
3CEP_ClothesYesYesSportsAdult8/30/2022 NoMen8/30/2022
4DDP_ShoesNoYesAdultN/A YesMen8/30/2022
5ORC_JeansNoYesAdult4/1/2022
6ORC_JeansNoNoMenAdult8/30/2022
7ORC_JeansNoYesMenAdult8/30/2022
8ORC_ShoesYesYesmove to womenAdult
9DDP_JeansYesYes
10
Sheet3
Cell Formulas
RangeFormula
J1:L4J1=LET(t,FILTER(B1:F10,(A1:A10=I2)+(A1:A10="Category")),r,ROWS(t),tf,t=INDEX(t,2,0),m,MMULT(SEQUENCE(,r,,0),tf+0),FILTER(t,m<r-1))
Dynamic array formulas.


The biggest issue is that I had to format all the columns J:Z (or whatever) as a date format, otherwise you'd just get the number value. This could cause a problem with some other values (like K2 here). But this can be easily remedied with Conditional Formatting. We can set up a rule that looks for certain headings (like "Sold from") and format that with a date, otherwise we'd just leave the standard General format.
Thank You Eric, it helps a lot.
 
Upvote 0

Forum statistics

Threads
1,215,204
Messages
6,123,630
Members
449,109
Latest member
Sebas8956

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