I want to build a function which changes a formula string extracted from a
cell. I need to create an offset-like function for formulas which replicates
what Excel naturally does when you insert rows and columns.
For example if the formula is:
A$1+SUM($A$1:$N$45)-$B4-B9
I want to have to two aspects to the function: row # change and col #
change. I want to use the function as follows:
var1 = "A$1+SUM($A$1:$N$45)-$B4-B9"
result = RevisedFormula(var1,1,1)
?result
"B$1+SUM($A$1:$N$45)-$B5-C10"
Any ideas on how to do this?
Thanks
EM
ExcelMonkey - 30 May 2008 17:56 GMT
Put another way, I want to replicate in code what Excel actually does when
you PASTE a copied cell to a new destination and the formula natuarlly
updates. I know I could replicate this by actualy using a temporary
worksheet and pass the formula to a cell and then copy to a new destination,
have Excel update the formula, and then extract the updated formula. However
I do not want to do this. I want to keep all of this in code.
Thanks
EM
> I want to build a function which changes a formula string extracted from a
> cell. I need to create an offset-like function for formulas which replicates
[quoted text clipped - 19 lines]
>
> EM
ExcelMonkey - 30 May 2008 22:01 GMT
Sorry I need to re-post this as it was not clarified properly.
EM
> I want to build a function which changes a formula string extracted from a
> cell. I need to create an offset-like function for formulas which replicates
[quoted text clipped - 19 lines]
>
> EM