T
Tiziano
I have a bunch of formulas in Column D. All these formulas are incorrectly
written, so I would like to remedy that by pre-pending/appending two text
strings to them; this would create new, correct formulas in the process.
For the sake of simplicity, let's assume that in Cell D1 I have this
original formula:
=A1*B1+C1
To this formula, I would like to pre-pend the string "=if(E1>5," and append
the string ",A1*B1+(C1*4))", thus obtaining the new formula:
=if(E1>5,A1*B1+C1,A1*B1+(C1*4))
Unfortunately, I cannot simply revise the formula in D1 and then copy/paste
down Column D because not all the formulas in that column are the same...
However, all the original formulas need to have the exact same strings
pre-pended and appended.
I tried with the =CONCATENATE() function and with the ampersand ("&"), but
nothing works because Excel does not regard the original formulas as text
strings. (I would get rid of the "=" sign in the original formula by also
embedding the functions =LEFT() and =LEN() in the formula.)
Can it be done?
Thanks.
written, so I would like to remedy that by pre-pending/appending two text
strings to them; this would create new, correct formulas in the process.
For the sake of simplicity, let's assume that in Cell D1 I have this
original formula:
=A1*B1+C1
To this formula, I would like to pre-pend the string "=if(E1>5," and append
the string ",A1*B1+(C1*4))", thus obtaining the new formula:
=if(E1>5,A1*B1+C1,A1*B1+(C1*4))
Unfortunately, I cannot simply revise the formula in D1 and then copy/paste
down Column D because not all the formulas in that column are the same...
However, all the original formulas need to have the exact same strings
pre-pended and appended.
I tried with the =CONCATENATE() function and with the ampersand ("&"), but
nothing works because Excel does not regard the original formulas as text
strings. (I would get rid of the "=" sign in the original formula by also
embedding the functions =LEFT() and =LEN() in the formula.)
Can it be done?
Thanks.