Hi everyone. Thanks in advance for reading this.
I'm trying to use VLOOKUP to return formula which it retreives from a table on a different tab. When the VLOOKUP is row 10, the formula would be (AB10/P10)*1000.
The difficulty i'm having is that when the row the VLOOKUP changes, the rows in the formula should match the current row, so in row 11 it would be (AB11/P11)*1000.
Now obviously i can't build the lookup table to account for every row so wondering how I'd construct that formula?
I'm then using the UDF "EVALUATETXT" (see below) to evaluate that text as if it were a formula. I keep getting #VALUE and #REF errors with every method I try.
UDF code:
Function EVALUATETXT(s As String) As Variant
Application.Volatile
EVALUATETXT = Application.EVALUATE(s)
End Function
Thanks
I'm trying to use VLOOKUP to return formula which it retreives from a table on a different tab. When the VLOOKUP is row 10, the formula would be (AB10/P10)*1000.
The difficulty i'm having is that when the row the VLOOKUP changes, the rows in the formula should match the current row, so in row 11 it would be (AB11/P11)*1000.
Now obviously i can't build the lookup table to account for every row so wondering how I'd construct that formula?
I'm then using the UDF "EVALUATETXT" (see below) to evaluate that text as if it were a formula. I keep getting #VALUE and #REF errors with every method I try.
UDF code:
Function EVALUATETXT(s As String) As Variant
Application.Volatile
EVALUATETXT = Application.EVALUATE(s)
End Function
Thanks