View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey
 
Posts: n/a
Default Macro - Return to starting cell

One way:

Dim rReturn As Range
Set rReturn = ActiveCell

'do your routine here

rReturn.Activate



In article ,
"sony654" wrote:

I am writing a macro that will always start in a different cell, but needs to
reference back to the starting cell each time it is run. For example, if the
cursor is in cell d3 when the macro is run, the macro must return to d3 when
finished. The next time the macro is run, it will start in e3, and return to
e3 when finished. I use the macro recorder to write my macros, how do I
write it to have the routine always end in the starting cell?