+ Reply to Thread
Results 1 to 3 of 3

Loop/copy rows variable times to new sheet

  1. #1
    Registered User
    Join Date
    03-17-2009
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Loop/copy rows variable times to new sheet

    I have a sheet in which almost every row needs to be copied to a new sheet, but a
    variable number of times. Example (source sheet):

    Qty Product# UPC
    2 BCD673 0112345698
    0 118 7894561563
    125 SPE1937 02845356978

    I'm looking for help with VBA code that would generate a list of product # with their respective UPC in a new sheet. Each record would be repeated (looped) according to the qty inputed in the "Qty required" column.

    The code would be triggered by a button pressed in the sheet. The code would wipe the information previously stored in the "output" sheet

    So the output list would look like this:


    Product# UPC (titles)
    BCD673 0112345698
    BCD673 0112345698
    SPE1937 02845356978
    SPE1937 02845356978
    SPE1937 02845356978
    SPE1937 02845356978
    ...

    Thanks in advance

    Ian
    Last edited by ianmaggy; 03-17-2009 at 09:08 PM. Reason: Bad presentation

  2. #2
    Valued Forum Contributor mdbct's Avatar
    Join Date
    11-11-2005
    Location
    CT
    MS-Off Ver
    2003 & 2007
    Posts
    848

    Re: Loop/copy rows variable times to new sheet

    Try this one:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-17-2009
    Location
    Montreal, Canada
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: Loop/copy rows variable times to new sheet

    Works Perfect!

    You're the man!

    Thanks a million

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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