+ Reply to Thread
Results 1 to 12 of 12

Need macro to insert rows & convert sequence of records into new sheet

  1. #1
    Registered User
    Join Date
    02-27-2012
    Location
    UK
    MS-Off Ver
    Excel 365
    Posts
    65

    Need macro to insert rows & convert sequence of records into new sheet

    someone kindly help me in generating macro or VB code to select, copy & insert rows on a click of button, it should also update associated formulas with the addition of rows.
    Basically its a date & time wise schedule, could range from 1st to 31st of any month & time wise it could be any half hour time.

    secondly also need to convert date wise schedule into new sheet with pre determined format. therefore needs button, when clicked it insert rows and another button to subsequently convert data into new sheet in a different format. Rows to copy & insert are from A10 A40.

    i have attached my file, with desired result and formatting. Also tried to explain with colors from where the values are to be copied; colors marked on both sheet are just for reference.
    Attached Files Attached Files
    Last edited by tabkaz; 05-16-2016 at 02:53 AM. Reason: no response

  2. #2
    Registered User
    Join Date
    02-27-2012
    Location
    UK
    MS-Off Ver
    Excel 365
    Posts
    65
    Bump no response
    Quote Originally Posted by tabkaz View Post
    Please someone kindly help me in generating macro to copy & insert rows on a click of button,,, also need to convert occurrence of data into new sheet with pre determined format. Need button to insert rows and subsequently convert data into new sheet in a different format. Rows to insert is A10 A40.

    Sheet contains various formulas associated from data sheet, so addition of rows should update formulas accordingly.

    i have attached my file, with desired result and formatting. Also tried to explain with colors from where the values are to be copied; colors marked on both sheet are just for reference.

  3. #3
    Registered User
    Join Date
    02-27-2012
    Location
    UK
    MS-Off Ver
    Excel 365
    Posts
    65

    Re: Need macro to insert rows & convert sequence of records into new sheet

    Bump No response

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Need macro to insert rows & convert sequence of records into new sheet

    I have pushed this to the other experts for you
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  5. #5
    Registered User
    Join Date
    02-27-2012
    Location
    UK
    MS-Off Ver
    Excel 365
    Posts
    65

    Re: Need macro to insert rows & convert sequence of records into new sheet

    Many thanks

  6. #6
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need macro to insert rows & convert sequence of records into new sheet

    Please Login or Register  to view this content.
    the basics of the extraction

    the code itself isnt optimised just a roughie to get the extraction out
    formatting will need to be tuned
    Attached Files Attached Files
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  7. #7
    Registered User
    Join Date
    02-27-2012
    Location
    UK
    MS-Off Ver
    Excel 365
    Posts
    65

    Re: Need macro to insert rows & convert sequence of records into new sheet

    Thanks humdingaling for looking into problem it & helping me with the solution.

    i am able to extract data as required but there is 2 issues i have figured, firstly the occurrence of values in date column are not being considered;
    for example if 2 is mentioned on may 2 at 9:00 AM, data extraction showing it only single time. Also if code cell is blank macro does not proceed further to extract remaining data.

  8. #8
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need macro to insert rows & convert sequence of records into new sheet

    the occurrence of values in date column are not being considered
    sorry didnt understand that was part of the request
    ill just need to tweak the code in order for this to happen

    if code cell is blank macro does not proceed further to extract remaining data
    this was not shown in your example

  9. #9
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need macro to insert rows & convert sequence of records into new sheet

    see attached version 2
    commented all i could...there are a number of variables to keep track of...
    in hindsight i should of named them better but i didn't know i would be requiring so many variables

    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    02-27-2012
    Location
    UK
    MS-Off Ver
    Excel 365
    Posts
    65

    Re: Need macro to insert rows & convert sequence of records into new sheet

    its awesome .... Thanks for your help..
    now its exactly doing what i was trying to do and best thing its super fast...in couple of seconds it can convert 1000s of record.

    FDibbins really appreciate your effort in solving this thread. Many Thanks

  11. #11
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Need macro to insert rows & convert sequence of records into new sheet

    glad to hear its working as you want it

    thanks for the rep
    cheers
    Hum

  12. #12
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,936

    Re: Need macro to insert rows & convert sequence of records into new sheet

    tabkaz, Im glad I was able to assist, thanks for the feedback

+ 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. insert missing dates for sequence in rows
    By solidwastes in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-07-2016, 06:38 PM
  2. How to insert rows in sheet1 based on sequence number.
    By aleanboy in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 10-16-2014, 12:35 PM
  3. Macro to INSERT a STRING in SEQUENCE or as the LAST entry
    By JamesGoulding85 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-20-2013, 09:04 AM
  4. [SOLVED] Insert missing rows into repeating number sequence
    By budgie300 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 09-12-2012, 06:17 PM
  5. Replies: 16
    Last Post: 01-25-2012, 09:27 AM
  6. Macro to insert many pictures in sequence?
    By applegatecz in forum Word Programming / VBA / Macros
    Replies: 0
    Last Post: 01-13-2010, 04:35 PM
  7. Insert Rows Between Unique Records
    By derekrap in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-14-2005, 04:03 PM

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