+ Reply to Thread
Results 1 to 5 of 5

Duplicate row based on a cell value

  1. #1
    Registered User
    Join Date
    10-14-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    3

    Duplicate row based on a cell value

    Hi, noob to the forum here, hope someone can help!

    I'm looking for a way to duplicate a row based on the value entered into a particular cell, e.g. I enter '4' in the cell and it duplicates a specified row 4 times and numbers them sequentially. I would then like it to copy the entire section (tracker box, heading and row 1) below this to start over again.

    So, like this:
    -value entered in D6, 'number of items', duplicates row 10 (B10-M10, highlighted in green) that same number of times
    -each duplicated row is numbered sequentially in cellB based on the 'number of items' (both highlighted in red)
    -the entire section B5-M10 (highlighted in blue) is then repeated below to start all over again
    8098070649_88ec360fdc_b.jpg

    So the tracker would look like the image below:
    8098070719_594327a0d3_b.jpg

    As you can see, the row to be duplicated is composed of a mix of manual-entry cells and drop-downs -the options for the drop down are kept on sheet1 (Control) in addition to a copy of the tracker box, heading and row 1, all in the same positions as on sheet2- and i would like these options to be available in every repeat of the original.

    Hope I have provided enough information to go on - and hope someone can help!

    Edit: apologies, excel file attached
    Attached Files Attached Files
    Last edited by pr0metheus; 10-20-2012 at 11:32 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Duplicate row based on a cell value

    Please do not post pictures. Instead post the sample excel file.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-14-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Duplicate row based on a cell value

    *thanks arlu

    i found the following which (i think) is part of what i'm looking for, can anyone help me build on that?

    http://en.kioskea.net/faq/7546-excel...umber-of-times

    Please Login or Register  to view this content.
    Last edited by pr0metheus; 10-25-2012 at 03:43 PM.

  4. #4
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Duplicate row based on a cell value

    Would you want the duplication and copying to be triggered by a button? Would you be having a button on your sheet so you can click on it ?

  5. #5
    Registered User
    Join Date
    10-14-2012
    Location
    UK
    MS-Off Ver
    Excel 2010
    Posts
    3

    Re: Duplicate row based on a cell value

    hi arlu, thanks for your reply!

    my initial preference is for it to happen automatically when the 'number of items' is entered but i'm open to any suggestions. if using a button on the sheet to generate the table and header of the next is the best/easiest way to do it that would be cool

+ 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