+ Reply to Thread
Results 1 to 5 of 5

Mulitplying rows of data; copy one row and create five identical rows

  1. #1
    Registered User
    Join Date
    05-08-2009
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Mulitplying rows of data; copy one row and create five identical rows

    Hi there,

    I have a spreadsheet with approx. 1900 rows, of which I need to duplicate each row and create five new rows all containing the same information. First three rows are:

    Product code Name Price RRP
    N0507 Foot pump 8.45 10.49
    N0508 Tent peg 28.95 34.99

    Which need to become:

    Product code Name Price RRP
    N0507 Foot Pump 8.45 10.49
    N0507 Foot Pump 8.45 10.49
    N0507 Foot Pump 8.45 10.49
    N0507 Foot Pump 8.45 10.49
    N0507 Foot Pump 8.45 10.49
    N0508 Tent peg 28.95 34.99
    N0508 Tent peg 28.95 34.99
    N0508 Tent peg 28.95 34.99
    N0508 Tent peg 28.95 34.99
    N0508 Tent peg 28.95 34.99

    And so on, and so on.

    Can anyone help?

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Mulitplying rows of data; copy one row and create five identical rows

    If your products are in A1 to A1900 try this in C for example:

    =INDEX(A1:A1900;ROUNDUP(ROW(A1)/5;0))

    And extend down as much as you need (Of course, you can put to count how many you need).

    Also, replace ; with , if you need.

  3. #3
    Registered User
    Join Date
    05-08-2009
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Mulitplying rows of data; copy one row and create five identical rows

    Hi,

    Thanks for your help, but the formula you suggested didn't work; I was presented with the error pane which said the formula contained an error - the last row number I have was also highlighted:

    =INDEX(A2:A1912;ROUNDUP(ROW(A2)/5;0))

    What do you think?

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Mulitplying rows of data; copy one row and create five identical rows

    Last row number doesn't matter. You can put as much as you need...

    You should add $

    =INDEX($A$2:$A$1912,ROUNDUP(ROW(A1)/5,0))

    Also, leave ROW(A1), doesn't matter where your data start.

    Edit:

    If you want to automaticly take care of empty places after last value

    Please Login or Register  to view this content.
    and if you want change number of multiply you can use some cell eg. B1 and replace number 5 with cell $B$1 so you can change it when you like 4,5,6,500 but you must put enough range $A$5000
    Last edited by zbor; 05-09-2009 at 03:56 AM.

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

    Re: Mulitplying rows of data; copy one row and create five identical rows

    I'd just number the lot down from 1-1900 copy paste 4 times below each other then sort by numbered column
    "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

+ 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