Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
need macro to edit formula...
this is difficult to explain, but here goes nothing...
here's my sample formula, in Cell G25: =IF(D25=0,0,IF(D45=0,0,B45)) This is what i want the macro to do: Step1: read the number in cell A1. (lets say i type "2" in there) Step2: Add "2" to every cell reference in G25's formula, except the reference that refers to the current cell's row (in this case, row 25). I.E. this would change G25's formula from: =IF(D25=0,0,IF(D47=0,0,B47)) to: =IF(D25=0,0,IF(D47=0,0,B47)) STEP3: copy the new formula down for 20 rows. I need this same thing to happen, if i type a number in A2 (except this time, it would be looking at the formula in I25 and following the same steps. I25's formula is : =IF(D25=0,0,IF(D44=0,0,B44)) can anybody help me please? if this can be done through some sort of pop up (which startup as soon as i open the worksheet), instead of typing a number in a cell, even better. but either way will work for me:) thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to edit formula | Excel Discussion (Misc queries) | |||
Macro to edit a formula. | Excel Programming | |||
MACRO TO EDIT CELL FORMULA !! | Excel Programming | |||
macro to edit formula | Excel Programming | |||
macro to edit formula | Excel Programming |