+ Reply to Thread
Results 1 to 12 of 12

Copy Range in row instead of "EntireRow"

  1. #1
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Copy Range in row instead of "EntireRow"

    I have this macro, when I am in column C and press enter it copies the current row then pastes it below.
    It uses the "EntireRow" function. The problem is my Excel spread sheet is now 133MB. And it is very slow.
    Is there a way to only copy the columns in the row that I need (to BQ) so that my workbook doesn't go to column XFD?
    And is there a way to make my current workbook smaller?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy Range in row instead of "EntireRow"

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Re: Copy Range in row instead of "EntireRow"

    Thanks! I tried it out but get an error in the with statement. See attached screen shot.2017-02-04.png

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy Range in row instead of "EntireRow"

    I knew your code was wrong too as it does not have a cell reference.

    .Copy Range("A" & LR + 1)
    does not include the row number(address)
    Try

    With Range(Cells(cell.Row, "A"), Cells(cell.Row, "BQ"))
    .Copy

  5. #5
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Re: Copy Range in row instead of "EntireRow"

    Not sure what happened, now nothing happens... here is what I have
    Please Login or Register  to view this content.

  6. #6
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Copy Range in row instead of "EntireRow"

    Where is the paste method in your code?
    I mean where are you pasting the copied range?
    Last edited by AB33; 02-04-2017 at 05:52 PM.

  7. #7
    Valued Forum Contributor
    Join Date
    11-28-2015
    Location
    indo
    MS-Off Ver
    2016 64 bitt
    Posts
    1,380

    Re: Copy Range in row instead of "EntireRow"

    please upload your workbook

  8. #8
    Valued Forum Contributor Maudibe's Avatar
    Join Date
    12-21-2016
    Location
    USA
    MS-Off Ver
    2010-2013
    Posts
    326

    Re: Copy Range in row instead of "EntireRow"

    Try

    Please Login or Register  to view this content.
    The way your code is setup, it copies the last row to the next row then clears it. Is that what you want to happen?

    Maud

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,522

    Re: Copy Range in row instead of "EntireRow"

    I knew your code was wrong too as it does not have a cell reference.
    The original code only refers to a single cell, Range("A" & LR) and uses .EntireRow
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  10. #10
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,535

    Re: Copy Range in row instead of "EntireRow"

    Is this for a Minimum Curvature Calculation Sheet?

  11. #11
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Re: Copy Range in row instead of "EntireRow"

    yes, something likethat, its a"slidesheet" that i use for my job

  12. #12
    Forum Contributor
    Join Date
    11-25-2012
    Location
    Edmonton, Alberta
    MS-Off Ver
    2010
    Posts
    146

    Re: Copy Range in row instead of "EntireRow"

    This works
    Thanks!!!!

    Quote Originally Posted by Maudibe View Post
    Try

    Please Login or Register  to view this content.
    The way your code is setup, it copies the last row to the next row then clears it. Is that what you want to happen?

    Maud

+ 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] VBA runs slow when executing "Cells().entirerow.insert"
    By EdH in forum Excel Programming / VBA / Macros
    Replies: 31
    Last Post: 11-05-2017, 12:46 AM
  2. Replies: 1
    Last Post: 01-22-2016, 09:21 AM
  3. [SOLVED] Copy cells from range "C3" to "F3" with loop and blank field
    By masterm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-16-2015, 01:03 PM
  4. Replies: 1
    Last Post: 02-15-2014, 04:05 PM
  5. "Not enough resources to display completely" error upon entirerow.delete
    By michaeljoeyeager in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-07-2012, 08:52 AM
  6. Replies: 3
    Last Post: 06-04-2011, 10:56 AM
  7. Macro Error with code "Range("A65536").End(xlUp).EntireRow.Insert"
    By lukasj13 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-30-2010, 08:48 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