here's my 1st code:-
Sub Macro2()
'
' Macro2 Macro
'
'
Selection.Copy
Sheets("Sheet2").Select
Application.Goto Reference:="R1C1"
Selection.End(xlToRight).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet3").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Sheet1").Select
ActiveCell.Offset(0, 1).Range("A1").Select
End Sub
and i want to do the following on repeating this code:-
Sub Macro4()
'
' Macro4 Macro
'
'
Selection.Copy
Sheets("Sheet2").Select
Application.Goto Reference:="R2C1"
Selection.End(xlToRight).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet3").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Sheet1").Select
ActiveCell.Offset(0, 1).Range("A1").Select
End Sub
Only difference is in the Application.Goto Reference:="R2C1" in both these macro's
goto reference:='R1C1" in my 1st code is achieved by copying the 'cell range' which is 'A1' in (sheet1) and pasting it in the 'Name Box' of ("sheet2") which gives me R1C1 reference. The problem is that next time when i run this Macro on cell range 'A2' rather than 'A1' from ("Sheet1), and it pastes it in the name box of ("sheet2") just like i did in 1st code, it puts the same reference:="R1C1" as if it is copying A1 and not A2 in the name box ... i need was "R2C1" for 'A2' in the name box of (sheet2).
any help will be appreciated
Sub Macro2()
'
' Macro2 Macro
'
'
Selection.Copy
Sheets("Sheet2").Select
Application.Goto Reference:="R1C1"
Selection.End(xlToRight).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet3").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Sheet1").Select
ActiveCell.Offset(0, 1).Range("A1").Select
End Sub
and i want to do the following on repeating this code:-
Sub Macro4()
'
' Macro4 Macro
'
'
Selection.Copy
Sheets("Sheet2").Select
Application.Goto Reference:="R2C1"
Selection.End(xlToRight).Select
Application.CutCopyMode = False
Selection.Copy
Sheets("Sheet3").Select
ActiveSheet.Paste
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Sheet1").Select
ActiveCell.Offset(0, 1).Range("A1").Select
End Sub
Only difference is in the Application.Goto Reference:="R2C1" in both these macro's
goto reference:='R1C1" in my 1st code is achieved by copying the 'cell range' which is 'A1' in (sheet1) and pasting it in the 'Name Box' of ("sheet2") which gives me R1C1 reference. The problem is that next time when i run this Macro on cell range 'A2' rather than 'A1' from ("Sheet1), and it pastes it in the name box of ("sheet2") just like i did in 1st code, it puts the same reference:="R1C1" as if it is copying A1 and not A2 in the name box ... i need was "R2C1" for 'A2' in the name box of (sheet2).
any help will be appreciated