View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Nikos Yannacopoulos[_5_] Nikos Yannacopoulos[_5_] is offline
external usenet poster
 
Posts: 80
Default Macros - Relative cells in Excel

The trick is to selectthe cell at the top of the list, which is known, and
then tell Excel to go all the way down to the last cell before the first
empty one. So, assuming the list starts in D4, the code would be:

Range("D4").Select
Selection.End(xlDown).Select

HTH,
Nikos


"BeardT" wrote in message
...
How can you program a macro to select data to the bottom of a list rather
than to a specific cell number? (i.e. for data of varying length)