View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
MMH MMH is offline
external usenet poster
 
Posts: 14
Default Autofill cell to right

I am trying to record a macro that will take the value of a cell and autofill
the next cell to the right. The problem I have is that the cell references
will be variable.

To try to explain this better, I have a spreadsheet with columns for each
month of the year that show values from another worksheet. At then end of
each month, I want to create a new column to insert that month's data. No
problems so far.

Once the column is inserted, I am trying to put a heading at the top of the
column (e.g. July 2005) by autofilling from the previous column (e.g. June
2005). But I cannot work out how to write my code so it will also work for
August, September etc.

Any help with this would be most appreciated.

Thank you
MMH