P
paic101
How easy a macro can be developed to remove the formula but leave the value
alone for a group of cells when a special condition matches like my example
here?
I started with the formula below but realized that I can’t get the result I
wanted as to leave the value alone for F4 in the IF formula when the month
moving forward. The F4 value originally returned from the Vlookup result.
F4: =IF(F2=B1,VLOOKUP($C2,'Sales07'!$B:$Z,10,FALSE),IF(F2>B1,C4+D4+E4,F4))
G4: =IF(G2=B1,VLOOKUP($C2,'Sales07'!$B:$Z,10,FALSE),IF(G2>B1,D4+E4+F4,G4))
H4: =IF(H2=B1,VLOOKUP($C2,'Sales07'!$B:$Z,10,FALSE),IF(H2>B1,E4+F4+G4,H4))
Where B1 : 200706, F2 : 200706, G2 : 200707, H2 : 200708
Other the problem of circulated reference, when I changed B1 to 200707, the
calculation for G4 & H4 stopped working unless I manually reset F4 to be the
value from the lookup result.
I haven’t written VBA in Excel but it sounds like it would solve my problem,
right? Can someone help me with the solution or suggestion to do? Thanks.
alone for a group of cells when a special condition matches like my example
here?
I started with the formula below but realized that I can’t get the result I
wanted as to leave the value alone for F4 in the IF formula when the month
moving forward. The F4 value originally returned from the Vlookup result.
F4: =IF(F2=B1,VLOOKUP($C2,'Sales07'!$B:$Z,10,FALSE),IF(F2>B1,C4+D4+E4,F4))
G4: =IF(G2=B1,VLOOKUP($C2,'Sales07'!$B:$Z,10,FALSE),IF(G2>B1,D4+E4+F4,G4))
H4: =IF(H2=B1,VLOOKUP($C2,'Sales07'!$B:$Z,10,FALSE),IF(H2>B1,E4+F4+G4,H4))
Where B1 : 200706, F2 : 200706, G2 : 200707, H2 : 200708
Other the problem of circulated reference, when I changed B1 to 200707, the
calculation for G4 & H4 stopped working unless I manually reset F4 to be the
value from the lookup result.
I haven’t written VBA in Excel but it sounds like it would solve my problem,
right? Can someone help me with the solution or suggestion to do? Thanks.