+ Reply to Thread
Results 1 to 4 of 4

VBA code copy data from one sheet to another error

Hybrid View

  1. #1
    Registered User
    Join Date
    06-20-2012
    Location
    Clearwater, Florida
    MS-Off Ver
    Excel 2007
    Posts
    28

    VBA code copy data from one sheet to another error

    Using the following code I am trying to copy data from rawdata1 to rawdata2. However I get an outside procedure error with the Offset(1,0) part of code.

    Also NOTe; Therer is code to remove duplicates in raswdata 1 . I get the same error if a I remove the duplicate code. Any suggestins??

    Sub copy()
    Sheets("rawdata1").Range("A1:AC10000").copy _
    Sheets("rawdata2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
    Sheets("rawdata2").Select

    End Sub

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: VBA code copy data from one sheet to another error

    Hey Clearwater

    Lake Wales here. Im not sure I run your code without errors. Anything else you can tell use about your workbook?
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    06-20-2012
    Location
    Clearwater, Florida
    MS-Off Ver
    Excel 2007
    Posts
    28

    Re: VBA code copy data from one sheet to another error

    Hi- your almost local.

    Not sure what I was doing wrong that caused the error. But it does work. I am trying to use this code to allow for cutting and pasting and clearing in raw data! tab What happens now it appears if I change a cell in rawdat1 it duplciates they entire contents below the first. Is there a way to only update changes? Thanks for your help

    Sub copy()
    Sheets("rawdata1").Range("A1:AC10000").copy _
    Sheets("rawdata2").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
    Sheets("rawdata2").Select

    End Sub

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,551

    Re: VBA code copy data from one sheet to another error

    Not sure what your wanting? Anyway to upload a example workbook showing what your wanting?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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