+ Reply to Thread
Results 1 to 4 of 4

Recreating a column but listing each item multiple times

  1. #1
    Registered User
    Join Date
    07-07-2007
    Posts
    14

    Recreating a column but listing each item multiple times

    I hope this is the right place to post this. Sorry if it is not. I could not find any posts that discuss what I am looking for. If someone knows of some and can point me in the right direction I would appreciate it.

    I need excel to recreate a list I already have in a new column, but list each item on the list multiple times. It is a bit hard to explain, so for example my list looks like this:

    (Column A)
    Red
    Green
    Blue
    Orange

    And I need a new list to be created in a new column that looks like:

    (Column B)
    Red
    Red
    Red
    Green
    Green
    Green
    Blue
    Blue
    Blue
    Orange
    Orange
    Orange

    It seems like this should be possible, but I cannot make it work. In the new column I typed in (for example) =A1 three times, then =A2 three times and then I used auto fill. But the auto fill uses the adjacent cell rather than a cell above multiple times.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try

    =OFFSET($A$1,INT((ROW()-1)/3),0)

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by katie1343
    I hope this is the right place to post this. Sorry if it is not. I could not find any posts that discuss what I am looking for. If someone knows of some and can point me in the right direction I would appreciate it.

    I need excel to recreate a list I already have in a new column, but list each item on the list multiple times. It is a bit hard to explain, so for example my list looks like this:

    (Column A)
    Red
    Green
    Blue
    Orange

    And I need a new list to be created in a new column that looks like:

    (Column B)
    Red
    Red
    Red
    Green
    Green
    Green
    Blue
    Blue
    Blue
    Orange
    Orange
    Orange

    It seems like this should be possible, but I cannot make it work. In the new column I typed in (for example) =A1 three times, then =A2 three times and then I used auto fill. But the auto fill uses the adjacent cell rather than a cell above multiple times.
    Hi,
    try

    =INDIRECT("A"&MOD(INT((ROW()-1)/3),4)+1)

    hth
    ---

    aaha - assuming that you wanted the set repeating, otherwise VBANoob's solution is shorter.
    ---
    Si fractum non sit, noli id reficere.

  4. #4
    Registered User
    Join Date
    07-07-2007
    Posts
    14
    Thank you so much!

+ 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