Search code examples
excelexcel-2010

Excel Dynamic Function Selection


I'm trying to run a function based on the datatype of a value.

I'm able to identify if a value is a number or a letter.

enter image description here

Here is my formula for column 3...

="="&IF(A2=TRUE, "value(", "upper(")&B2&")"

How could I get excel to invoke my function? Right now it is just displaying the text and not running the function.

Thank You


Solution

  • You were trying to build a string to represent a formula, which won't work, so the simpler solution is just:

    =if(isnumber(a1),value(a1),upper(a1))