+ Reply to Thread
Results 1 to 4 of 4

Repeat and automatically copy row to new row

  1. #1
    Registered User
    Join Date
    03-23-2005
    Posts
    33

    Smile Repeat and automatically copy row to new row

    pls look into attached excel file for better understanding.

    What i want:

    I want to repeat all the data in row based on value in QTY column,

    for example : if row 3 has "2" in column named "qty", then want to repeat it by two times...copy same data of row 3 to new row.

    row 5 has 15 value, so repeat it 15 times, add new 14 rows with same data of row5
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    06-17-2009
    Location
    Chennai,India
    MS-Off Ver
    Excel 2003,excel 2007
    Posts
    678

    Re: Repeat and automatically copy row to new row

    I have copied the data from column A to F to another sheet sheet2.
    this is my data sheet

    the required macro is


    Please Login or Register  to view this content.
    if you want to use this for data in sheet1 modify the statement
    Worksheets("sheet2").Activate
    to
    Worksheets("sheet1").Activate

  3. #3
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Repeat and automatically copy row to new row

    or
    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  4. #4
    Registered User
    Join Date
    03-23-2005
    Posts
    33

    Red face Re: Repeat and automatically copy row to new row

    venkat1926

    your code is giving me error on line 4. Its says run-time error '6'. Overflow.

    j = Range("a1").End(xlDown).Row



    pike
    your code is working well.

    Thanks for you kind support.

    I am attaching one more file.
    can you people help me with that file pls?

    Thanks in advance to all of you. Really this will be very very helpful to me.
    Attached Files Attached Files

+ 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