roxnoxsox
02-05-2015, 05:34 AM
This may sound like a stupid question but basically-
I have a spreadsheet where if a button is pressed, it will show cell A1 of sheet2 in cell G1 of Sheet1.
The code I'm using to do this is:
Sub CopyData()
Sheets("Sheet2").Range("A1").Copy Sheets("Sheet1").Range("G1")
End Sub
However, I need this to work for looooots of other rows. So for example, on the next row, I need cell A2 of sheet2 to show in cell G2 of Sheet1. Is there a way of doing this without retyping it each time? I realise it's a difficult problem and might not be at all possible but worth a shot!
I have a spreadsheet where if a button is pressed, it will show cell A1 of sheet2 in cell G1 of Sheet1.
The code I'm using to do this is:
Sub CopyData()
Sheets("Sheet2").Range("A1").Copy Sheets("Sheet1").Range("G1")
End Sub
However, I need this to work for looooots of other rows. So for example, on the next row, I need cell A2 of sheet2 to show in cell G2 of Sheet1. Is there a way of doing this without retyping it each time? I realise it's a difficult problem and might not be at all possible but worth a shot!