View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] cmotes@gmail.com is offline
external usenet poster
 
Posts: 7
Default Macros to copy formulas

I am in need of 2 macros that will accomplish the following:

MACRO #1:
From the active column I need to automatically copy over a set of

formulas from the column to the left of the active column.
+ The row numbers where the source cell of the formula to be copied
don't change.
+ The columns need to be flexible based on the active cell (1 column to
the left of the active cell should be copied 1 column over).
+ I need to be able to change the active cell / column and have the
formula operate on the column to the left.
+ Example: Active cell is B1. Copy formulas in cells A5, A9 and A15
over to cells B5, B9 and B15. If I move active cell to C1, need to copy
formulas from column B to C.

MACRO #2:
Perform the same step as macro 1 PLUS offset the external row
references in this formula by 7 (column stays the same)

Example:
Cell A20 in Sheet 1 has this formula: =sum(sheet2$B10:$B17)
Active cell is B1
Macro should copy formula from A20 to B20 AND change formula to:
=sum(sheet2$B18:$B24)

Thanks!