I have a large list of product ID’s setup up in the following format;
JavaScript
x
13
13
1
SKU
2
1002NAV
3
1003BLU
4
1007PNB
5
1008NAV
6
1009NAV
7
1010BLK
8
1010BLU
9
1011BLU
10
1011BUR
11
1011GRY
12
1011NAV
13
The first 4 numbers representing the style of product and corresponding 3 letters representing the colour, as a result any products that have the same 4 number style ID will be identical products (just different colours)
I would like to return a list of all full product ID’s that have multiple styles in order to group them, so the above list would return something like;
JavaScript
1
8
1
SKU
2
1010BLK
3
1010BLU
4
1011BLU
5
1011BUR
6
1011GRY
7
1011NAV
8
It would ignore the other SKU’s such as 1002NAV
as there is only one style of this product.
I have a little knowledge of python as well if this cannot be done in excel but would prefer to keep it all within excel if possible.
Thank you.
Advertisement
Answer
Assuming your input is a list of unique SKU’s, try:
Formula in B1
:
JavaScript
1
2
1
=FILTER(A1:A11,COUNTIF(A1:A11,LEFT(A1:A11,4)&"*")>1,"")
2