Copy lines of data based on a cell number, 1 = 10 copies

phillip87

Board Regular
Joined
Jan 28, 2019
Messages
69
I have a sheet to be filled out by staff which shows how many racks and shelves they have in a storeroom, I need a second sheet that copies this data the number of time equal to the amount of shelving they have in order to create bin locations on the shelf.

Each shelf of each cabinet bay needs to have 10 locations to accommodate the stock that will be put on it which at the moment has to be done manually as every site/storeroom is different.

example - section AA has 1 shelf - the result I need is - section AA listed 10 times, this means if they put a 2 for the number of shelves then it would copy it 20 times.

In the example I would want them to fill in just 1 line of the blue section (not including "Bin" in order to create all 10 lines shown
 

Attachments

  • Mr excel.PNG
    Mr excel.PNG
    30.4 KB · Views: 19
Please update your profile to show that you are using 365 as previously requested.
Also what is your data when you get the error?
 
Upvote 0

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Please update your profile to show that you are using 365 as previously requested.
Also what is your data when you get the error?
Please see the screenshot attached on page 2, the sheet is working just as planned except if a location has more than 4 shelves it starts to repeat the for the first line in each new level.

example:

MS-ST01-AA-04-01
MS-ST01-AA-05-02
MS-ST01-AA-05-03
MS-ST01-AA-05-04
MS-ST01-AA-05-05
MS-ST01-AA-05-06
MS-ST01-AA-05-01
MS-ST01-AA-06-02
MS-ST01-AA-06-03
MS-ST01-AA-06-04
MS-ST01-AA-06-05
MS-ST01-AA-06-06
MS-ST01-AA-06-01
MS-ST01-AA-07-02
MS-ST01-AA-07-03
MS-ST01-AA-07-04
MS-ST01-AA-07-05
MS-ST01-AA-07-06
 
Upvote 0
That is the output, not the data. Also you have still not updated your profile.
 
Upvote 0
That is the output, not the data. Also you have still not updated your profile.
The data is per image, this can change depending on the location and rooms. This front page is fine and no 2 lines are ever the same, just need to figure out why the formula is duplicating and switching the rows around as soon as it goes over 4 "shelfs"

1695076137929.png
 
Upvote 0
Is there any reason why you have not updated your profile as requested?
If you cannot be bothered to help us by showing your Excel version & platform, why should be bother to help you?

I'm not sure what your problem is as it works for me.
Fluff.xlsm
ABCDEFGHI
1
2MSST01AA5MS-ST01-AAMS-ST01-AA-01-01
3MSST02AB6MS-ST02-ABMS-ST01-AA-01-02
4MSST03AC0MS-ST03-ACMS-ST01-AA-01-03
5MSST04AD2MS-ST04-ADMS-ST01-AA-01-04
6MS-ST01-AA-01-05
7MS-ST01-AA-01-06
8MS-ST01-AA-01-07
9MS-ST01-AA-01-08
10MS-ST01-AA-01-09
11MS-ST01-AA-01-10
12MS-ST01-AA-02-01
13MS-ST01-AA-02-02
14MS-ST01-AA-02-03
15MS-ST01-AA-02-04
16MS-ST01-AA-02-05
17MS-ST01-AA-02-06
18MS-ST01-AA-02-07
19MS-ST01-AA-02-08
20MS-ST01-AA-02-09
21MS-ST01-AA-02-10
22MS-ST01-AA-03-01
23MS-ST01-AA-03-02
24MS-ST01-AA-03-03
25MS-ST01-AA-03-04
26MS-ST01-AA-03-05
27MS-ST01-AA-03-06
28MS-ST01-AA-03-07
29MS-ST01-AA-03-08
30MS-ST01-AA-03-09
31MS-ST01-AA-03-10
32MS-ST01-AA-04-01
33MS-ST01-AA-04-02
34MS-ST01-AA-04-03
35MS-ST01-AA-04-04
36MS-ST01-AA-04-05
37MS-ST01-AA-04-06
38MS-ST01-AA-04-07
39MS-ST01-AA-04-08
40MS-ST01-AA-04-09
41MS-ST01-AA-04-10
42MS-ST01-AA-05-01
43MS-ST01-AA-05-02
44MS-ST01-AA-05-03
45MS-ST01-AA-05-04
46MS-ST01-AA-05-05
47MS-ST01-AA-05-06
48MS-ST01-AA-05-07
49MS-ST01-AA-05-08
50MS-ST01-AA-05-09
51MS-ST01-AA-05-10
52MS-ST02-AB-01-01
Sheet3
Cell Formulas
RangeFormula
I2:I131I2=TOCOL(IF(SEQUENCE(,MAX(F2:F100*10))<=F2:F100*10,G2:G100&"-",1/0),2)&DROP(REDUCE("",F2:F100,LAMBDA(x,y,IF(y>0,VSTACK(x,TEXT(INT(SEQUENCE(y*10,,0,0.1))+1,"00")),x))),1)&"-"&TEXT(MOD(SEQUENCE(SUM(F2:F100)*10,,0),10)+1,"00")
G2:G5G2=B2&"-"&C2&"-"&D2&E2
Dynamic array formulas.
 
Upvote 0

Forum statistics

Threads
1,223,230
Messages
6,170,883
Members
452,364
Latest member
springate

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