J
Jim Robinson
What are the macro equivalent commands corresponding to the arrow keys (up
down left right) and to the "end" key?
Right now if I do the "record keystrokes" command for end up to take me up
to the last row with data, the recorded macro takes me to a particular cell.
I want it to simply do the equivalent of end up no matter where end up might
take me.
Here is what I am actually trying to do.
Dim rng As Range, tvalue
tvalue = WorksheetFunction.Max(Range("C13:C20"))
Set rng = Cells.Find(tvalue)
I find the max value (tvalue) in a range, then I set rng to be the cell
where that value is located. Now I want to go to that cell and copy tvalue
and the data in the cell to the right of tvalue to another location.
I have no problem determining tvalue or determining the cell location of
tvalue. Beyond that, I am stumped.
down left right) and to the "end" key?
Right now if I do the "record keystrokes" command for end up to take me up
to the last row with data, the recorded macro takes me to a particular cell.
I want it to simply do the equivalent of end up no matter where end up might
take me.
Here is what I am actually trying to do.
Dim rng As Range, tvalue
tvalue = WorksheetFunction.Max(Range("C13:C20"))
Set rng = Cells.Find(tvalue)
I find the max value (tvalue) in a range, then I set rng to be the cell
where that value is located. Now I want to go to that cell and copy tvalue
and the data in the cell to the right of tvalue to another location.
I have no problem determining tvalue or determining the cell location of
tvalue. Beyond that, I am stumped.