Convert Text into Formula in VBA
This works for your example. You should add error checking and ensure that
you are replacing the correct chars, but you get the idea.
Public Function MyEval(argCell As Range) As Variant
Dim TempStr As String
TempStr = Replace(argCell.Text, "x", "*")
MyEval = Evaluate(TempStr)
End Function
NickHK
"ak" wrote in message
...
How can the text in one cell convert into formula?
For example, this is the text in Cells(1,1) :-
18.5x20x15
instead of using the INSTR to find each "x" , any other method?
thanks for the help in advance
|