+ Reply to Thread
Results 1 to 5 of 5

Copy and Paste using macro very slow is this code correctly done? Need help with a edit

  1. #1
    Forum Contributor
    Join Date
    08-14-2014
    Location
    US
    MS-Off Ver
    2013
    Posts
    135

    Copy and Paste using macro very slow is this code correctly done? Need help with a edit

    I have piece of code that I made so I am sure it is not efficient even though it does work it is very slow locks up excel at times. It is only copying around 15 words and Columns A:G do have formatting but only up to rows 101. Can this be made more efficient speed wise and how can I edit the ranges say A:F to A150:F150 and G:L to G150:L150 when I change those to that it no long keeps the column widths. Right now it is copying like 18k row or more I dont need which might be the lag issue even though they are empty.

    Please Login or Register  to view this content.
    Thank you for looking

  2. #2
    Forum Guru Winon's Avatar
    Join Date
    02-20-2007
    Location
    East Rand, R.S.A.
    MS-Off Ver
    2010
    Posts
    6,113

    Re: Copy and Paste using macro very slow is this code correctly done? Need help with a edi

    Hello Mr_Bill,

    Please try:

    Please Login or Register  to view this content.
    Last edited by Winon; 09-13-2014 at 12:06 PM. Reason: Corrected Code
    Please consider:

    Be polite. Thank those who have helped you. Then Click on the star icon in the lower left part of the contributor's post and add Reputation. Cleaning up when you're done. If you are satisfied with the help you have received, then Please do Mark your thread [SOLVED] .

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Copy and Paste using macro very slow is this code correctly done? Need help with a edi

    Will the no of rows to copy change?
    If posting code please use code tags, see here.

  4. #4
    Forum Contributor
    Join Date
    08-14-2014
    Location
    US
    MS-Off Ver
    2013
    Posts
    135

    Re: Copy and Paste using macro very slow is this code correctly done? Need help with a edi

    Winon thank you but that didnt fix this picky thing only one set formatted right and that is the first set you didnt add the 200 to. Here is how it ended up
    1bQBMow.png

    Norie no the amount to copy will not change. If for any reason I need to add more to the new sheet I can just use the format painter and add more by hand.


    On a side note I think I resolved the problem I made a new sheet and hand copied the columns and rows to the new sheet. Deleted the original MasterSheet and rename the new one to MasterSheet and went from 5 minutes to around 5 seconds to create new sheet. I tried this as I noticed on the original I had a tiny slider so something else was on that page I think.

    I also added this tid bit to the end of that Application.CutCopyMode = False because I was getting an error on exit something like "the image is too large and will be truncated" think that is how you clear the clipboard. Like hitting esc after you paste something. Just think something went fubar when I created the first mastersheet.

  5. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Copy and Paste using macro very slow is this code correctly done? Need help with a edi

    OOOH Mr. Bill - you should mark this thread as solved(go to the top and click on the thread tools)
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ 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. [SOLVED] want to edit recorded macro code or copy a cell with formula and paste it down to "x" cell
    By bmbalamurali in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 10-25-2013, 04:57 PM
  2. [SOLVED] Copy Paste Code Edit
    By Alex O in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-08-2012, 11:39 AM
  3. Copy/paste macro is running slow
    By Kaplan275 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-26-2012, 08:28 AM
  4. [SOLVED] Macro to copy, edit and paste data
    By Smelborp in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2012, 03:03 AM
  5. Copy/Paste code running very slow
    By Zimbo in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 04-07-2009, 04:40 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