Combine data to give new list

Dugmac

New Member
Joined
Nov 30, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi there

I have a list of product codes for which I want to assign to each a "size" category. Can anyone think of a way to automate this process? I've included an example below showing 3 product codes and 5 sizes. I want to create a new list which gives for each item five new product codes (one for each size) so 20 items in total as shown in the Revised Data cloumn.

1669809635404.png


Thanks very much

Dugmac
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Hi & welcome to MrExcel.
How about
Fluff.xlsm
ABC
1
2
332942001000023294200100002S
432942001000013294200100002M
532942001000053294200100002L
63294200100002XL
73294200100002XXL
83294200100001S
93294200100001M
10S3294200100001L
11M3294200100001XL
12L3294200100001XXL
13XL3294200100005S
14XXL3294200100005M
153294200100005L
163294200100005XL
173294200100005XXL
18
Main
Cell Formulas
RangeFormula
C3:C17C3=TOCOL(IF(A10:A14="",x,TRANSPOSE(A3:A5)&A10:A14),3,1)
Dynamic array formulas.
 
Upvote 0
Thanks very much :) For some reason it doesn't seem to work (I get #values when I post that formulae into my sheet).

Any idea what I'm doing wrong? I'm probably being thick!

1669811525089.png
 
Upvote 0
Ok, you probably don't have th TOCOL function yet.
How about
Fluff.xlsm
ABC
1
2
332942001000023294200100002S
432942001000013294200100002M
532942001000053294200100002L
63294200100002XL
73294200100002XXL
83294200100001S
93294200100001M
10S3294200100001L
11M3294200100001XL
12L3294200100001XXL
13XL3294200100005S
14XXL3294200100005M
153294200100005L
163294200100005XL
173294200100005XXL
18
Main
Cell Formulas
RangeFormula
C3:C17C3=LET(a,A3:A5,b,A10:A14,r,ROWS(b),s,SEQUENCE(r*ROWS(a),,0),INDEX(a,INT(s/r)+1)&INDEX(b,MOD(s,r)+1))
Dynamic array formulas.
 
Upvote 0
Do you normally use commas as the separator in a formula?
 
Upvote 0
Inside the formula all the different parts are separated by a comma. Is that what you normally use, or do you normally use a semi-colon?
 
Upvote 0
Inside the formula all the different parts are separated by a comma. Is that what you normally use, or do you normally use a semi-colon?
Ah I see. I would use a comma.
 
Upvote 0
In that case do you have both the LET and SEQUENCE functions?
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,249
Members
449,075
Latest member
staticfluids

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