Results 1 to 10 of 10

VBA to copy data from 1 worksheet to another

Threaded View

  1. #1
    Forum Contributor
    Join Date
    04-20-2012
    Location
    Singapore
    MS-Off Ver
    Excel 2010
    Posts
    135

    VBA to copy data from 1 worksheet to another

    Hi

    May I request for help (vba codes) to copy data from 1 worksheet to another:
    Source: sheet1
    Range: A1:IJ1000
    Detination: sheet9

    I tried the following (add "Module 1") but the code cannot work:

    Sub CopySource()
        Dim rngSource As Range
        Dim rngTarget As Range
        Dim iRow As Integer
    
        Set rngSource = Worksheets("Sheet1").Range("A1:IJ100")
        iRow = Worksheets("Sheet9").Cells(Rows.Count, 1).End(xlUp).Row + 1
        Set rngTarget = Worksheets("Sheet9").Range("A" & iRow)
        rngSource.Copy Destination:=rngTarget
    End Sub
    Thank you for your attention and assistance.

    Regards
    Nancy
    Last edited by nancyching1711; 01-12-2018 at 06:13 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 13
    Last Post: 10-05-2015, 08:59 AM
  2. Macro to copy data from multiple worksheet cells in to a single Master worksheet
    By thunt13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-08-2015, 03:24 PM
  3. [SOLVED] Copy data from a worksheet and paste to worksheet with a similar worksheet name
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-21-2012, 04:02 AM
  4. Copy data from a worksheet and paste to worksheet with a similar worksheet name
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-21-2012, 02:49 AM
  5. Replies: 1
    Last Post: 08-29-2012, 07:11 PM
  6. Replies: 8
    Last Post: 04-20-2011, 09:45 AM
  7. Replies: 4
    Last Post: 02-25-2009, 03:16 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