VBA - changing references for formula based on a given criteria

bob1987

New Member
Joined
Jul 18, 2017
Messages
1
Dear All,
I am struggling with this issue for a while.
I have to build a macro that changes formulas references according to a given set of criteria (basically moving the reference if it refers to external factor and staying at the previous year if it internal)
ABCDEFGHI
1Typename201620172018201920202021
2externalprice10010195987858
3internaldiscount5542-1-5
4internalvolume101110,5111011
5
6formula=(C2-C3)*C4=(C2-D3)*D4=(D2-E3)*E4=(E2-F3)*F4=(F2-G3)*G4=(G2-H3)*H4
7

<tbody>
</tbody>

Unfortunately there are no standard formulas that are calculated.
I would like only to insert the first formula (in C6) and then build a macro that extend it. I know that it is possible but I cannot get around it :(:(
 

Forum statistics

Threads
1,082,574
Messages
5,366,387
Members
400,887
Latest member
tporeda

Some videos you may like

This Week's Hot Topics

Top