Am recording a macro to "clean up" imported data, and as we know, Excel
picks up firm cell locations rather than the range desired. This is
undesirable, as the sheets are different each time and the ranges vary.
My question is: seeing the examples of the code below, is there a way
to obtain such code via the keyboard during the recording phase,
without taking the results (which contain specific cell references) and
reinterpreting them and adjusting each one by hand? This macro is
quite lengthy.
(examples taken from J-walk.com(rangesel.xls)):
Sub SelectDown()
Range(ActiveCell, ActiveCell.End(xlDown)).Select
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SelectUp()
Range(ActiveCell, ActiveCell.End(xlUp)).Select
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SelectToRight()
Range(ActiveCell, ActiveCell.End(xlToRight)).Select
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SelectToLeft()
Range(ActiveCell, ActiveCell.End(xlToLeft)).Select
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SelectCurrentRegion()
ActiveCell.CurrentRegion.Select
End Sub
'''''''''''''''''''''''''''''''''''''''''''''''''''
Sub SelectActiveArea()
Range(Range("A1"), ActiveCell.SpecialCells(xlLastCell)).Select
End Sub
TIA for any ideas.
Pierre
Bookmarks