how+to+evaluate+a+string+in+excel

how to evaluate a string in excel how to evaluate text as a function in excel

First press alt+F11 to open the code editor (source http://office.microsoft.com/en-us/excel-help/create-custom-functions-in-excel-2007-HA010218996.aspx) Click Insert->Module Paste this ev code (source: http://superuser.com/questions/253353/excel-function-that-evaluates-a-string-as-if-it-were-a-formula)

Function ev(r As Range) As Variant ev = Evaluate(r.Value) End Function

Close the editor start using the ev function like normal in the excel worksheet

Note that macro enabled excel files need to be saved as an xlsm file. When these files are opened, macros might be disabled by default, and you may have to click to enable them on the warning message at the top of the screen.