Results 1 to 1 of 1

Thread: copying data between sheets

Threaded View

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Nov 2005
    Location
    Oxford UK
    Posts
    76

    Question copying data between sheets

    Hi, a total amateur here. I'm trying to do a bit of vba thats not working. I want to be able to enter data on multiple sheets and automatically have excel copy all new changes in column A rows 5 to 25, onto a list sheet that gathers the information. Heres what I've done but getting type mismatch error.
    Code:
    Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    Dim iRow As Long
    Dim ws As Worksheet
    Dim rcell As Long
    Dim aws As Worksheet
    
    Set ws = Worksheets("List")
    Set aws = ActiveSheet
    
    iRow = ws.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
    
    rcell = aws.Cells("a5:a25").End(xlUp).Offset(1, -1)
        
    ws.Cells(iRow, 1) = aws.Cells(rcell).Value
       
    End Sub
    Last edited by thelocaluk; Feb 25th, 2006 at 04:23 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width