+ Reply to Thread
Results 1 to 5 of 5

Macro To Create Duplicate Rows

  1. #1
    Registered User
    Join Date
    07-11-2014
    Location
    Surprise,AZ
    MS-Off Ver
    2010
    Posts
    53

    Macro To Create Duplicate Rows

    I have to import data and it reads as follows:
    TAG cost qty Total
    G13-1718 $150.00 1 $150.00
    G13-1599 $150.00 1 $150.00
    G13-1599 $150.00 4 $600.00
    G13-1718 $150.00 2 $300.00

    $1200.00

    What I need is that each row with more than 1 qty be duplicated and total dollars divided by the appropriate qty, Like the following:

    G13-1718 $150.00 1 $150.00
    G13-1599 $150.00 1 $150.00
    G13-1599 $150.00 1 $150.00
    G13-1599 $150.00 1 $150.00
    G13-1599 $150.00 1 $150.00
    G13-1599 $150.00 1 $150.00
    G13-1718 $150.00 1 $150.00
    G13-1718 $150.00 1 $150.00

    $1200.00

    see attached please
    Attached Files Attached Files

  2. #2
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro To Create Duplicate Rows

    try the following macro:
    Please Login or Register  to view this content.
    Pierre Leclerc
    _______________________________________________________

    If you like the help you got,
    Click on the STAR "Add reputation" icon at the bottom.

  3. #3
    Registered User
    Join Date
    07-11-2014
    Location
    Surprise,AZ
    MS-Off Ver
    2010
    Posts
    53

    Re: Macro To Create Duplicate Rows

    Quote Originally Posted by p24leclerc View Post
    try the following macro:
    Please Login or Register  to view this content.
    It works perfectly

  4. #4
    Forum Expert p24leclerc's Avatar
    Join Date
    07-05-2010
    Location
    Québec
    MS-Off Ver
    Excel 2021
    Posts
    2,081

    Re: Macro To Create Duplicate Rows

    If column D is not a formula, you can use this modified macro:
    Please Login or Register  to view this content.
    Last edited by alansidman; 07-15-2014 at 06:25 PM. Reason: code tags added.

  5. #5
    Registered User
    Join Date
    07-11-2014
    Location
    Surprise,AZ
    MS-Off Ver
    2010
    Posts
    53

    Re: Macro To Create Duplicate Rows

    Perfect!! thanl you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. create duplicate rows for each cell contents
    By 12@ in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2014, 02:59 PM
  2. [SOLVED] Create Duplicate Rows
    By ignes in forum Excel General
    Replies: 5
    Last Post: 12-24-2013, 11:20 AM
  3. Macro to create duplicate rows
    By Q-D in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-19-2009, 03:40 PM
  4. Delete Duplicate Rows:create a macro
    By LB79 in forum Excel General
    Replies: 1
    Last Post: 09-12-2006, 06:59 AM

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