We help IT Professionals succeed at work.
Get Started

Macro to update formula of columns in worksheet

197 Views
Last Modified: 2014-11-13
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:X4)"

Worksheet 1 "sheet1":
To Update:
1. column S - =((Sheet2!W4)*$A4)/1000 > update to  =((Sheet2!X4)*$A4)/1000
2. column T- =((AF4-Sheet2!W4)*$A4)/1000 > update to =((AF4-Sheet2!X4)*$A4)/1000
3. column U- =AF4/AE4-1 > update to =AG4/AF4-1
4. column V- =((AF4-AE4)*$A4)/1000 > update to =((AG4-AF4)*$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:X4)"

formula update up to row 130 ONLY

notice that the formula is always an increment of the column.
Comment
Watch Question
US Data Team Lead
CERTIFIED EXPERT
Top Expert 2014
Commented:
This problem has been solved!
Unlock 1 Answer and 15 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE