Hi i've created a macro which copys data from one sheet and pastes it into another, however the macro fails whenever it pastes. It never actually worked although it worked during recording.
I have now tried many different ways to copy and paste, the latest message i am getting is subscript out of range, i will include the code that i am using, i am desperate for help as i have been doing this for 4 days, believing it would take half a day,
Dim valtest
Dim icounter
Range("a1"
.Select
valtest = ActiveCell.Value
icounter = 1
Do While valtest <> ""
Range("a" & icounter).Select
valtest = ActiveCell.Value
Icounter = icounter + 1
Loop
Range("A1:AP" & icounter).Select
Selection.Copy
Workbooks.Open Filename:="U:\macros\datatogo"
Sheets("sheet2"
.Select
Range("A1"
.Select
ActiveSheet.Paste
I would be grateful for any help, also the amount of records i have been copying has been 700 max.
I have now tried many different ways to copy and paste, the latest message i am getting is subscript out of range, i will include the code that i am using, i am desperate for help as i have been doing this for 4 days, believing it would take half a day,
Dim valtest
Dim icounter
Range("a1"
valtest = ActiveCell.Value
icounter = 1
Do While valtest <> ""
Range("a" & icounter).Select
valtest = ActiveCell.Value
Icounter = icounter + 1
Loop
Range("A1:AP" & icounter).Select
Selection.Copy
Workbooks.Open Filename:="U:\macros\datatogo"
Sheets("sheet2"
Range("A1"
ActiveSheet.Paste
I would be grateful for any help, also the amount of records i have been copying has been 700 max.