
April 16th, 2004, 08:15 AM
|
|
Registered User
|
|
Join Date: Mar 2004
Location: Montreal, CANADUH
Posts: 8
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
Problem with macro recorder in Excel 2002
Hi All,
I'm sure that this question has beeen asked many times before me, but I need to know this in a very immediate way. I have recorded a macro in Excel (2002) that works perfectly well. That is, it works for the file that I used to create it with. At one point in the macro, I navigate to the last line of data, copy the selection, and paste it to the first blank line. The script looks like this:
Selection.End(xlDown).Select
Range(Selection, Selection.End(xlToRight)).Select
Selection.Copy
Range("A24").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
The problem is the Range("A24").Select part. I would want the script to be something that will adapt to the possibility that next time I might have 50 lines instead of 23 data lines, or 10, or 157... I want to record how I got to my cell, not the cell itself. Is there a listing somewhere of the keystroke commands? Any help will be greatly appreciated.
Creo
|