I have a user defined function that is used in hundreds of places all across a workbook.
The UDF is something like getRate("Some Text", SOME_CONSTANT). The function basically does a VLOOKUP into a table and gets the rate for the requested item. If it can't find the item then it returns zero.
I want to get rid of the UDF and just use a direct formula instead.
So getRate("Some Text", SOME_CONSTANT) needs to be changed to
IFERROR(VLOOKUP("Some Text", RATE_TABLE, SOME_CONSTANT, FALSE),0)
Note: The "Some Text" portion varies in each formula and SOME_CONSTANT is different too in some cases.
I basically need to do this to achieve what I need
1. Replace getRate( with IFERROR(VLOOKUP(
2. Replace SOME_CONSTANT with RATE_TABLE, SOME_CONSTANT, FALSE),0)
However, when I try the above, excel does not allow it as the formula becomes incorrect on doing the first replace. Doing the 2nd one first also gives an error.
I can probably break it down further and get it done but using too many replaces is a bit risky as it might affect some other formula.
Is there any other simple way to get this done?
The UDF is something like getRate("Some Text", SOME_CONSTANT). The function basically does a VLOOKUP into a table and gets the rate for the requested item. If it can't find the item then it returns zero.
I want to get rid of the UDF and just use a direct formula instead.
So getRate("Some Text", SOME_CONSTANT) needs to be changed to
IFERROR(VLOOKUP("Some Text", RATE_TABLE, SOME_CONSTANT, FALSE),0)
Note: The "Some Text" portion varies in each formula and SOME_CONSTANT is different too in some cases.
I basically need to do this to achieve what I need
1. Replace getRate( with IFERROR(VLOOKUP(
2. Replace SOME_CONSTANT with RATE_TABLE, SOME_CONSTANT, FALSE),0)
However, when I try the above, excel does not allow it as the formula becomes incorrect on doing the first replace. Doing the 2nd one first also gives an error.
I can probably break it down further and get it done but using too many replaces is a bit risky as it might affect some other formula.
Is there any other simple way to get this done?