+ Reply to Thread
Results 1 to 6 of 6

Creating userform to duplicate rows based on counter which defines iterations

  1. #1
    Forum Contributor
    Join Date
    01-26-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2013
    Posts
    154

    Creating userform to duplicate rows based on counter which defines iterations

    Dear Experts,

    Firstly thanks for all your lovely assistance to the world. This help means a lot to us .
    In this project , if any of you get the time to attend , i need a macro which duplicates row entries !

    Please see the attached sheet which contains 2 tabs Input and output ....
    The output duplicates row entries for every individual entry in column J

    For example here , for each entry in column J , if you see output tab i am duplicating it 10 times ...however i have a dded column J which shows me the counter and column K containing the field names ...in fact there were more columns which deleted ....i wish that the macro leaves the other columns untouched and just inserts one new column J which helps me to know the row counter

    i would love the macro to give me a userform with some kind of a index file to launch the macro from. This is so that i can run the macro on multiple files where i want to run similar operations without having to copy the VB code from file to file...i can simply browse the file and specify the number of times i want to duplicate rows based on value in Column J of INPUT tab

    The idea of a index file which gives me a user form to specify row iterations can be seen in this link where David sir was gracious to offer me such a solution which i was really not aware of earlier -http://www.excelforum.com/excel-programming-vba-macros/1038939-create-new-file-based-on-first-100-rows.html#post3847861


    Coming back to the project, using the user form if i had specified row counter to say 100 entries , then each entry in column J would get duplicated 100 times ...while duplicating , i want the complete row to be be taken with all columns in complete along with color code because the color has a purpose ...with the addition of a extra column which shows the row counter

    Note , that the total number of rows can be arrived at by seeing cell A1 which will contain value "END" denoting the end of entries .So , we can first count total number of rows based on this parameter before then deciding to duplicate the rows based on column J entries !

    I would be so happy if someone could help me ...the project if developed would help me make knowledge in some subjects free !

    Cheers ,

    Amlan Dutta
    Attached Files Attached Files

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Creating userform to duplicate rows based on counter which defines iterations

    Seems we meet again.

    I hope this meets your needs.
    Attached Files Attached Files
    David
    (*) Reputation points appreciated.

  3. #3
    Forum Contributor
    Join Date
    01-26-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2013
    Posts
    154

    Re: Creating userform to duplicate rows based on counter which defines iterations

    Dear David ,

    I cannot even express how much happy i am to see you again take up the project ....you are a living legend ...Thanks so so much for taking this project up.....
    I did try working with the file but unfortunately i could not get it working ...though when i opened up the VB module , i could see that you have defined a user form, but when i open the sheet , there is no user form to like run the source file !
    I think maybe there is some small thing happening which i am unable to understand ,

    If you can look into it , i will be so happy ...nevertheless thanks a tonne for picking this one up !

    Cheers ,

    Amlan

  4. #4
    Forum Contributor
    Join Date
    01-26-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2013
    Posts
    154

    Re: Creating userform to duplicate rows based on counter which defines iterations

    Dear David ,

    The userform defined in the macro doesn't show up in the sheet ...am i like doing something wrong ....am so sorry to give you pain

    Humble regards ,

    Amlan Dutta

  5. #5
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: Creating userform to duplicate rows based on counter which defines iterations

    Oops, forgot that.

    Look for a new tab called Tools, next to the Home Tab.

    In case you save this as a 2003, I've added a button at A1.
    Attached Files Attached Files
    Last edited by Tinbendr; 12-22-2014 at 12:25 PM.

  6. #6
    Forum Contributor
    Join Date
    01-26-2012
    Location
    Mumbai
    MS-Off Ver
    Excel 2013
    Posts
    154

    Re: Creating userform to duplicate rows based on counter which defines iterations

    Dear David ,

    You are the sweetest thing that god can create! I am so happy that he made you ...there was indeed a tools button like you said and when i clicked on it the user from did come up and rest like you understand was magic unweaved the way you wrote it!
    Since i use excel 2007 , the 2003 button didn't work but trust me , that is not needed because with the tools itself i am able to achieve what i want ...one thing that i further loved is that even the formatting is retained in the output Tab's ...that is a added bonus .
    I have marked the thread as solved and obviously given you credits ...i wish i could have done more ...you are a true masterpiece ...now my dream of making a question bank has got a shot in the arm thanks to your lovely magic !

    Thank you so so so so so so so muchhhhhhh!

+ 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. Creating dynamic userform based on several file names and creating chart overlays
    By Thorn23 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-18-2014, 12:09 PM
  2. [SOLVED] Delete rows based on duplicate cell, but leaving first and last duplicate.
    By LadyNicole in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-28-2013, 05:07 AM
  3. [SOLVED] Creating Duplicate Rows in Excel
    By back_in_the_1980s in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-24-2012, 09:33 AM
  4. Excel 2007 : Creating x Number of Duplicate Rows
    By Matt Parsons in forum Excel General
    Replies: 2
    Last Post: 10-25-2011, 05:55 AM
  5. [SOLVED] Creating a counter that does not include hidden rows
    By TechMGR in forum Excel General
    Replies: 1
    Last Post: 04-04-2005, 06:06 PM

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