VLOOKUP equation in VBA
That specific formula
Public function MySpecialLookup()
s = "VLOOKUP(L11,'Sheet'!$I$2:$K$19,2)+"
s1="(L11-VLOOKUP(L11,'Sheet'!"$I$2:$K$19,1))/"
s2="VLOOKUP(L11,'Sheet'!$I$2:$K$19,3)*(VLOOKUP("
s3="VLOOKUP(L11,'Sheet'!$I$2:$K$19,1)+VLOOKUP("
s4="L11,'Sheet'!$I$2:$K$19,3),'Sheet'!$I$2:$K$19,2 )"
s5 = "-VLOOKUP(L11,'Sheet'!$I$2:$K$19,2)"
MySpecialLookup = Evaluate(s & s1 & s2 & s3 & s4 & s5)
End Function
--
Regards,
Tom Ogilvy
"Ed" wrote:
Hi all,
Looking for help creating an equivalent VBA public function statement for
the following VLOOKUP formula:
=VLOOKUP(L11,'Sheet'!$I$2:$K$19,2)+(L11-VLOOKUP(L11,'Sheet'!$I$2:$K$19,1))/VLOOKUP(L11,'Sheet'!$I$2:$K$19,3)*(VLOOKUP(VLOOKUP (L11,'Sheet'!$I$2:$K$19,1)+VLOOKUP(L11,'Sheet'!$I$ 2:$K$19,3),'Sheet'!$I$2:$K$19,2)-VLOOKUP(L11,'Sheet'!$I$2:$K$19,2)
Thanks in advance for everyone's help,
Ed
|