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