Hi,
I have created a yEval function that seems to work fine except when I am trying to perform a mathematical function on two references using INDIRECT...here's a simplified version of what I'm trying to do:
in A1 I have a value of 10, in A2 I have a value of 5
below, I have placed cell references $A$1 and $A$2 in B1 and B2
if I simply write the following formula, I get the intended result of "2"
=INDIRECT(B1)/INDIRECT(B2)
however, if I have the formula as text and attempt to use my yEval function, I get a #REF! error
the funny thing is that my yEval function works if I attempt to use it on either part of the expression, but it doesn't work when I attempt to perform the division
my function is as follows:
Function yEval(item As String)
yEval = Evaluate(item)
End Function
I know I can simply divide the formula up into different cells, but I'd really like to make it work...any thoughts?
TIA,
Mike
I have created a yEval function that seems to work fine except when I am trying to perform a mathematical function on two references using INDIRECT...here's a simplified version of what I'm trying to do:
in A1 I have a value of 10, in A2 I have a value of 5
below, I have placed cell references $A$1 and $A$2 in B1 and B2
if I simply write the following formula, I get the intended result of "2"
=INDIRECT(B1)/INDIRECT(B2)
however, if I have the formula as text and attempt to use my yEval function, I get a #REF! error
the funny thing is that my yEval function works if I attempt to use it on either part of the expression, but it doesn't work when I attempt to perform the division
my function is as follows:
Function yEval(item As String)
yEval = Evaluate(item)
End Function
I know I can simply divide the formula up into different cells, but I'd really like to make it work...any thoughts?
TIA,
Mike