Hi - can't figure how to solve following (mentally) simple operation:

Given a range of cells with formulas of form, say, [=x1-y1] and [=x1/y1], i want to replace those cells with =if(a1="", "",[x1-y1]), ie replace original formula with a conditional check and original formula if condition met. As i need to convert a fair amount of such cells it would make sense to have a macro i can just apply to a cell, ie take content of cell, eg [=x1-y1], and replace with "=if(a1="","", x1-y1).

I created a macro, but rather that taking the formula in the cell i am applying it to, it takes the formula from the cell which i developed the macro on and apply that (except columns changed). Logically, what macro should do is take formula in cell, store in stack,replace with =if(a1="", "", insert original formula from stack).

Inputs appreciated.

Thanks.