0

I one cell I have to use several different formula depending on certains case. I another sheet named Static, I wrote a Matrix of formulas in TEXT for all the cases. My matrix have Criteria1 in rows Criteria2 in columns So with INDEX/MATCH i will get the text formula for every scenario Criteria1/Criteria2.

Now I want to Evaluate this formula in text. I did a custom function in VBA

Function Evalue(ByVal str As String)
Application.Volatile
Evalue = Evaluate(str)
End Function

It works when the function is in one block like SUM CONCATENATE etc... but not when there operation of function + -

Community
  • 1
  • 1

1 Answers1

0

Your UDF works for me........in A1 enter the text string:

sum(B2:B5)+sum(C4:C9)

in another cell:

=Evalue(A1) displays the correct value.

Gary's Student
  • 95,722
  • 10
  • 59
  • 99