Hi
I don't quite follow you all the way, but here are techniques that I hope
will get you started:
Sub test()
Dim R As Range
Set R = Selection(1)
R.Value = Sheets(1).Range("Field").Value
R.Offset(0, -3).Value = Now
R.Offset(-1, 12).Resize(4, 5).Select
End Sub
HTH. Best wishes Harald
"Cutter " skrev i melding
...
Hello everyone. I only discovered this forum a month ago and regret not
knowing of it sooner. What a fantastic resource it is and how I could
have used it before I retired.
I've always been able to get the results I want by recording a macro
but this time it doesn't work the way I want it to. Here is what I
want to achieve.
Start on Sheet 5 (or any Sheet from 2 to 10) and make a cell active by
clicking on it.
Now I want to click on a button to start a macro to do the following:
Go to a named range ("Field") on Sheet 1 and copy it (This part
recorded properly), now return to the original Sheet 5 (my macro did
this but because I want to put buttons for the same macro on other
sheets I don't want it to specify Sheet 5). Once on Sheet 5 I want it
to paste the values only in the original active cell but again I don't
want to specify the cell by name because it will be different the next
time I run the same macro. Next I want to move 3 cells to left of
active cell (without specifying cell address) and insert today's date.
Next I want to move 1 row up and 12 columns over, select 20 adjacent
cells (which contain formulae) and copy them to the row below them.
Finally I want to end up at the cell directly below the original active
cell.
The basic problem I'm having is the moving to the various cells on the
Sheet without specifying their addresses because I need the macro to
drop down a row each time it is run.
Thanks for taking the time to read this and for any thoughts you may
have on it.
---
Message posted from http://www.ExcelForum.com/