+ Reply to Thread
Results 1 to 5 of 5

Macro Paste and Offset?

  1. #1
    Registered User
    Join Date
    12-21-2016
    Location
    Minnesota, USA
    MS-Off Ver
    2010
    Posts
    11

    Macro Paste and Offset?

    Hello all,

    I am trying to figure out this problem I am having with the following code:
    Please Login or Register  to view this content.
    The whole intent here to cut the entire row based on a value present on column "P" and then paste it in the designated sheet. It seemed to work just fine a month ago, but suddenly this code started pasting the value over existing content in the destination sheet. Can anyone help me figure out how to make sure that each time the row is being pasted it is offset and does not overwrite an existing row?

    Unfortunately I cannot upload the workbook as it contains confidential information for my company (in case anyone asks)

    Thanks!

  2. #2
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Macro Paste and Offset?

    The code is using the last value in column A in the destination sheet to determine the last row.
    Should it be using a different column?
    If there are values in other columns below the last value in Column A, then those rows will be overwritten.

  3. #3
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Macro Paste and Offset?

    If there is not a consistent column to reliably determine the next row, try amending the code like this.
    The nextrow is found by searching for the last value regardless of column
    Repeat for each Case

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    12-21-2016
    Location
    Minnesota, USA
    MS-Off Ver
    2010
    Posts
    11

    Re: Macro Paste and Offset?

    Thank you both, really good helpful! I did not realize that A stood for where to check, I indeed had empty A fields. I changed it accordingly.

  5. #5
    Forum Expert
    Join Date
    11-22-2016
    Location
    Cornwall,UK
    MS-Off Ver
    office 365
    Posts
    4,240

    Re: Macro Paste and Offset?

    You are welcome

    Glad it worked for you - can you now go to "Thread Tools" at top of thread and mark the thread as solved.
    thanks
    Kev

+ 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. Extreme right black cells (Offset) Start paste macro runned datas.
    By thilag in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-03-2016, 01:55 AM
  2. Copy and Paste with Offset
    By atwy in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-26-2015, 09:29 AM
  3. macro to locate locate text string and copy/paste offset range
    By guystanley in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-16-2014, 08:46 PM
  4. Replies: 1
    Last Post: 02-04-2014, 01:57 PM
  5. Vba Paste Offset
    By irishman311 in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 07-26-2012, 03:04 PM
  6. Problem with Selection find, offset, copy & paste Macro
    By MDResearcher in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 06-21-2011, 05:51 PM
  7. [SOLVED] copy and paste with offset
    By kevcar40 in forum Excel General
    Replies: 3
    Last Post: 10-10-2005, 11:05 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