Solved

# Macro to update formula of columns in worksheet

Posted on 2014-11-06

Macro to update formula in column in active worksheet.

For example if column J has formula "=SUM(O4:W4)" then macro should update it to "=SUM(O4:**X**4)"

Worksheet 1 "sheet1":

To Update:

1. column S - =((Sheet2!W4)*$A4)/1000 > update to =((Sheet2!**X**4)*$A4)/1000

2. column T- =((AF4-Sheet2!W4)*$A4)/1000 > update to =((AF4-Sheet2!**X**4)*$A4)/1000

3. column U- =AF4/AE4-1 > update to =A**G**4/A**F**4-1

4. column V- =((AF4-AE4)*$A4)/1000 > update to =((A**G**4-A**F**4)*$A4)/1000

formula update EXCLUDE those shaded cells within the column.

Worksheet 2 "Sheet2":

To Update:

1. column J - "=SUM(O4:W4)" then macro should update it to "=SUM(O4:**X**4)"

formula update up to row 130 ONLY

notice that the formula is always an increment of the column.