I'm trying to write a code that will switch back and forth between sheets, taking the inputs from one sheet and then pasting them on another sheet. This is the code.
For r = 1 To ActiveCell.End(xlDown).Row
Cells(1, c).Select
Do Until IsEmpty(Selection)
name = ActiveCell.End(xlToLeft).Value
email = ActiveCell.End(xlToLeft).Offset(0, 1).Value
phoneNumber = ActiveCell.End(xlToLeft).Offset(0, 2).Value
generation = ActiveCell.End(xlToLeft).Offset(0, 3).Value
status = ActiveCell.End(xlToLeft).Offset(0, 13).Value
ActiveCell.Offset(1, 0).Select
Sheets("Compiled Data").Select
'paste data
Cells(oRow, c) = name
Cells(oRow, c + 1) = email
Cells(oRow, c + 2) = phoneNumber
Cells(oRow, c + 3) = generation
Cells(oRow, c + 4) = status
oRow = oRow + 1
r = r + 1
Sheets("Sheet 1").Activate
Loop
Next
The problem is when I get to the .Activate part, Excel reads that the subscript is out of range.
What should I do?