+ Reply to Thread
Results 1 to 14 of 14

Repeating Columns

Hybrid View

  1. #1
    Registered User
    Join Date
    12-09-2009
    Location
    Saint Charles, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    15

    Repeating Columns

    I've got about 500 locations to type out.

    0060060011
    0060060012
    0060060013
    0060060014
    0060060015 and so on. This is a racking list for a warehouse and I just wanted to know if there's an easier way than manually entering each location. 006006 will go from 1-152 with 5 levels.

    The next line would be..

    0060060021
    0060060022
    0060060023
    0060060024
    0060060025
    Last edited by Rmnticjas; 10-30-2012 at 05:20 PM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Repeating Columns

    Type in the first two entries (ending 001 and 002), then select both cells, then drag down the fill handle (the small black square in the bottom right corner of the cursor) until you reach 152. Then change your level and enter the first two with that level and repeat.

    Hope this helps.

    Pete

    P.S. Not sure what your "level" is.

  3. #3
    Registered User
    Join Date
    12-09-2009
    Location
    Saint Charles, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Repeating Columns

    It's all in the same column. The column is 0060010023(006-Room, 001-Aisle, 002-bay, 3-Level)

  4. #4
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,414

    Re: Repeating Columns

    So you want the bay to increase from 001 to 152 while the level is at 1, then again while the level is at 2, and so on up to the level equals 5? The room and aisle remain the same?

    Pete

  5. #5
    Registered User
    Join Date
    12-09-2009
    Location
    Saint Charles, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Repeating Columns

    The aisle will increase as well but that's something I can repeat when the aisles complete. The bay will increase and the level will list as 1-5. The bay will repeat 5 times with each level.

    0060010011
    0060010012
    0060010013
    0060010014
    0060010015
    0060010021
    0060010022
    0060010023
    0060010024
    0060010025

  6. #6
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Repeating Columns

    with a1 to a5 formated text
    0060010011
    0060010012
    0060010013
    0060010014
    0060010015
    in a6 =TEXT(A1+10,"0000000000") dragged down maybe
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  7. #7
    Registered User
    Join Date
    12-09-2009
    Location
    Saint Charles, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Repeating Columns

    0060061042
    0060061043
    0060061044
    0060061045
    0060061055
    0060061065
    0060061075
    0060061085


    The last 4 rows are what the formula gave me.

  8. #8
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Repeating Columns

    ????????????????? with starting a1
    0060061042
    0060061043
    0060061044
    0060061045
    then a5
    =TEXT(A1+10,"0000000000")
    you get
    0060061042
    0060061043
    0060061044
    0060061045
    0060061052
    0060061053
    0060061054
    0060061055
    0060061062
    0060061063
    0060061064

  9. #9
    Registered User
    Join Date
    12-09-2009
    Location
    Saint Charles, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Repeating Columns

    Will that not bring back anything ending in 1?

  10. #10
    Forum Contributor
    Join Date
    09-24-2012
    Location
    York, England
    MS-Off Ver
    Excel 2003/07/10
    Posts
    165

    Re: Repeating Columns

    Hello
    The problem is that its difficult to build a formula because its not a linear progression of numbers.
    With 0060060011 you need to add one four times, reaching 0060060015 and then add ten and
    deduct 4 to get to the next code 0060060021.
    Using If statements this would be possible, but I think that it would be easier to build up the list in (say) 3 separate columns

    Cols 1 2 3 4
    006006 001 1 Concatenate Col1&Col2&Col3
    006006 001 2
    006006 001 3
    006006 001 4
    006006 001 5

    Col 1 is a formula that repeats 006006 as many times as necessary.
    Col 2 Repeats the value in the previous row unless col 3 of the previous
    row is 5, inwhich case it adds 1 to the value in the previous row
    Col 3 Adds one to the value in the row above, or sets it back to one if the row
    above has reached five.

    Using this strategy you can build a long list of codes and concatenate the results
    as shown. Finally if you need the codes across the columns rather than by rows
    you can do this with Paste Special /Transpose.

    HTH

  11. #11
    Forum Contributor
    Join Date
    09-24-2012
    Location
    York, England
    MS-Off Ver
    Excel 2003/07/10
    Posts
    165

    Re: Repeating Columns

    Hello Again
    Sorry about the spacing of my column headers above. Col 4 is the contatenation of 1,2 and 3.

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Repeating Columns

    it will repeat anything you start with see post #6
    Attached Files Attached Files
    Last edited by martindwilson; 11-01-2012 at 08:37 PM.

  13. #13
    Forum Contributor
    Join Date
    09-24-2012
    Location
    York, England
    MS-Off Ver
    Excel 2003/07/10
    Posts
    165

    Re: Repeating Columns

    Hello Martin
    Agreed .... Your solution is an "easier to operate" solution than mine.

  14. #14
    Registered User
    Join Date
    12-09-2009
    Location
    Saint Charles, Illinois
    MS-Off Ver
    Excel 2007
    Posts
    15

    Re: Repeating Columns

    Thank you MartinDwilson! It worked. You saved me hours of work!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1