Creating X number of rows on a 2nd tab with populated data

Xcelling

New Member
Joined
Feb 13, 2025
Messages
4
Office Version
  1. 365
Platform
  1. MacOS
How do I take input data from tab A and create X number of rows in tab B to populate the data. X is the value shown as "Count" in column A on the Tab A. Tab B needs to be saved as a csv file to upload to a database. There could be up to 20 rows in input Tab A for a given data set.

1739470325372.png
1739470392818.png
MenuSample.xlsx
ABCDEFGH
1CountTable LetterFruitMeatBread
22AAppleSteakWheat
33BOrangeChickenSourdough
45CPearFishRye
51DPlumBurgerFrench
6
7
8
9
10
11
12
13
14
Input


MenuSample.xlsx
ABCDEFGHIJK
1Table LetterFruitMeatBread
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Ouput
 
Is this what you mean?
Book2
ABCDEFGHIJ
1CountTable LetterFruitMeatBreadTable LetterFruitMeatBread
22AAppleSteakWheatAAppleSteakWheat
33BOrangeChickenSourdoughAAppleSteakWheat
45CPearFishRyeBOrangeChickenSourdough
51DPlumBurgerFrenchBOrangeChickenSourdough
6BOrangeChickenSourdough
7CPearFishRye
8CPearFishRye
9CPearFishRye
10CPearFishRye
11CPearFishRye
12DPlumBurgerFrench
Sheet1
Cell Formulas
RangeFormula
G2:J12G2=TEXTSPLIT(TEXTJOIN(",",,TOCOL(IFS(SEQUENCE(,MAX(A2:A5))<=A2:A5,BYROW(B2:E5,LAMBDA(x,TEXTJOIN("|",,x)))),2)),"|",",")
Dynamic array formulas.
 
Upvote 0
I need blank spaces between columns G, H, I so I can add data validations (type of apple), (how meat should be cooked), etc
 
Upvote 0
You'd need to adjust the column you want individually like this...
Book2
ABCDEFGHIJKLM
1CountTable LetterFruitMeatBreadTable LetterFruitMeatBread
22AAppleSteakWheatAAppleSteakWheat
33BOrangeChickenSourdoughAAppleSteakWheat
45CPearFishRyeBOrangeChickenSourdough
51DPlumBurgerFrenchBOrangeChickenSourdough
6BOrangeChickenSourdough
7CPearFishRye
8CPearFishRye
9CPearFishRye
10CPearFishRye
11CPearFishRye
12DPlumBurgerFrench
Sheet1
Cell Formulas
RangeFormula
G2:G12G2=TOCOL(IFS(SEQUENCE(,MAX(A2:A5))<=A2:A5,B2:B5),2)
I2:I12I2=TOCOL(IFS(SEQUENCE(,MAX(A2:A5))<=A2:A5,C2:C5),2)
K2:K12K2=TOCOL(IFS(SEQUENCE(,MAX(A2:A5))<=A2:A5,D2:D5),2)
M2:M12M2=TOCOL(IFS(SEQUENCE(,MAX(A2:A5))<=A2:A5,E2:E5),2)
Dynamic array formulas.
 
Upvote 0
This is a great! Is there a way to add a sequential count for the number of items using a formula J2 =1,J3=2,J4=1,J5=2,J6=3,J7=1, etc
 
Upvote 0
Book2
GHIJKLM
1Table LetterFruitMeatBread
2AApple1SteakWheat
3AApple2SteakWheat
4BOrange1ChickenSourdough
5BOrange2ChickenSourdough
6BOrange3ChickenSourdough
7CPear1FishRye
8CPear2FishRye
9CPear3FishRye
10CPear4FishRye
11CPear5FishRye
12DPlum1BurgerFrench
Sheet1
Cell Formulas
RangeFormula
G2:G12G2=TOCOL(IFS(SEQUENCE(,MAX(A2:A5))<=A2:A5,B2:B5),2)
I2:I12I2=TOCOL(IFS(SEQUENCE(,MAX(A2:A5))<=A2:A5,C2:C5),2)
J2:J12J2=MAP(I2#,LAMBDA(m,COUNTIFS(I2:m,m)))
K2:K12K2=TOCOL(IFS(SEQUENCE(,MAX(A2:A5))<=A2:A5,D2:D5),2)
M2:M12M2=TOCOL(IFS(SEQUENCE(,MAX(A2:A5))<=A2:A5,E2:E5),2)
Dynamic array formulas.
 
Upvote 0
Solution

Forum statistics

Threads
1,226,771
Messages
6,192,918
Members
453,766
Latest member
Gskier

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