Excel Evaluate formula error

Dmitrij Holkin

New member
Joined
Jun 8, 2012
Messages
1
Reaction score
0
Points
0
My VBA code is
Code:
Function yEval(entry As String)
    yEval = Evaluate(entry)
Application.Volatile




End Function


in Sheet1 in cell f4 i have formula =yEval(Sheet2!E19)
cell d4 on sheet1 contains number 12

Sheet2!I19 contains string $Q
if Sheet2!e19 has string INDIRECT("pries!"&Sheet2!I19&12) or INDIRECT("pries!"&Sheet2!I19&Sheet1!d4) the formula return result from sheet pries!$Q12
if Sheet2!e19 has string INDIRECT("pries!"&Sheet2!I19&address(row(),4)) or INDIRECT("pries!"&Sheet2!I19&"Sheet1!D"&row()) the formula return result 0


How to make work this formula to change this part depending on row number INDIRECT("pries!"&Sheet2!I19&Sheet1!d4)
 
Back
Top