Go to a given row number

R

Richard_123

Hello,

In a cell I have a number, which can change. Say it was 75. I then want to
copy the value off one sheet in, say cell A1, and paste it into cell G75 on
another sheet.

I'd like to be able to do this with a macro, so that if the number 75
changes to 30, it will copy cell A1 into cell G30 instead.

Is this possible?

Thanks,
Richard
 
L

Lars-Åke Aspelin

Hello,

In a cell I have a number, which can change. Say it was 75. I then want to
copy the value off one sheet in, say cell A1, and paste it into cell G75 on
another sheet.

I'd like to be able to do this with a macro, so that if the number 75
changes to 30, it will copy cell A1 into cell G30 instead.

Is this possible?

Thanks,
Richard


Try this macro:

Sub doit()
Worksheets("Sheet2").Range("G" & Worksheets("Sheet1").Range("B1")) =
Worksheets("Sheet1").Range("A1")
End Sub

Cell B1 on Sheet1 is the cell with your number that can change.

Hope this helps / Lars-Åke
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top