+ Reply to Thread
Results 1 to 3 of 3

Generate each item "n" times in sequence

  1. #1
    Registered User
    Join Date
    10-08-2010
    Location
    D.C., USA
    MS-Off Ver
    Excel 2003
    Posts
    1

    Red face Generate each item "n" times in sequence

    Greetings

    I am just a novice at Excel, so I know there is probably a very easy way to do this (I just don't know what it is). I am working with Excel 2003.

    Basically I want to generate a long list where each item in column A is repeated "n" number of times, depending on what is in column B, but also make each repeated item increase sequentially. The following example should explain better.

    Take this information:

    (Column A): CB03982 527 (Column B):3
    (Column A): CB04785 527 (Column B):1
    (Column A): CB03090 527 (Column B):2
    (Column A): CB02257 527 (Column B):3

    and generate this:

    (Column C): CB03982 527
    (Column C): CB03982 528
    (Column C): CB03982 529
    (Column C): CB04785 527
    (Column C): CB03090 527
    (Column C): CB03090 528
    (Column C): CB02257 527
    (Column C): CB02257 528
    (Column C): CB02257 529


    Thanks in advance!
    Last edited by Macemann; 10-08-2010 at 01:32 PM.

  2. #2
    Forum Contributor
    Join Date
    01-28-2010
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    157

    Re: Generate each item "n" times in sequence

    This assumes that the greatest column B value will be 6 and that there are only 25 rows of data in columns A and B. Formulas will need to be changed to accommodate more rows and when maximum column B value is greater than 6.
    This formula in D1 has been filled down to row 25 and across to column I (col D to col I = 6 cols)
    Please Login or Register  to view this content.
    It generates the necessary incremented values across each of the 25 rows.
    This array formula (must be entered using the Ctrl+Shift+Enter PC key combination) in C1 has been filled down column C until it starts returning blanks
    Please Login or Register  to view this content.
    It extracts the incremented values in $D$1:$I$25 and displays them in the correct order down column C.
    See attachment.
    Attached Files Attached Files
    Last edited by beaunydal; 10-08-2010 at 06:50 PM.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Generate each item "n" times in sequence

    A macro solution to consider:

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Ben Van Johnson

+ 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