Hey all,
Is it possible to paste a formula as a UDF? For instance, let's say I have an extremely long nested formula, is there a way I can copy and paste it into the VBA editor without having to re-code the whole thing?
Thanks,
Andrew
Hey all,
Is it possible to paste a formula as a UDF? For instance, let's say I have an extremely long nested formula, is there a way I can copy and paste it into the VBA editor without having to re-code the whole thing?
Thanks,
Andrew
Last edited by SoothSailor; 11-26-2014 at 11:55 AM.
Formulas and VBA have very different syntax - you cannot paste a formula and expect VBA to be able to run it, but you can Evaluate it...
... but I cannot think of a reason why yuou would want to do this, especially as native Excel Formulas are more efficient than VBA code doing the same thing...Please Login or Register to view this content.
You can also evaluate the formula itself, rather than referring to a cell containing the formula. This is almost a copy & paste into VBA but you have to double up any quotes.
You can also create a named formula in Excel that might do what you want without VBA.Please Login or Register to view this content.
In any case, I'm not sure what the best solution is for your specific situation. We can give more specific advice if you show us the formula.
Sweet! This is extremely helpful. Thanks!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks