View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ricki Miles Ricki Miles is offline
external usenet poster
 
Posts: 19
Default Relative reference in macro

I am recording a macro in Excel XP that will select a range of data and make
a chart. The data will always be ten rows and two columns. Since the data
may start in different cells on different sheets, I would like the macro to
be relative so that when I click a starting cell and then run the macro, it
will select the data starting at the active cell. I have tried recording by
first activating the starting cell I would like, then Tools, Macro, Record
New Macro, clicking the relative reference button on the macro toolbar, then
selecting the range of cells and creating the chart.

When I use this macro in any starting cell, it always charts the data by
starting at the cell I was at when I recorded the macro. What am I doing
wrong?

Thanks for the help,

Ricki