Nested Vlookup Looking for Error Workaround

  • Thread starter Thread starter larrysd1
  • Start date Start date
L

larrysd1

I need to create a Vlookup that looks up another vlookup depending upon
the value in another cell. I'm sure I have the formula logic right but
when I try to reference a cell's name as if it were the named range in
a vlookup formula I get an error.

=IF(G11<$R$15,VLOOKUP(1991,CHOOSE(VLOOKUP(L12,VehType,2,FALSE),"Ndep","Trkdep"),2,FALSE),VLOOKUP(G11,TrkDep,2,FALSE))*F11*IF(H11="X",0,IF(H11="B",$V$17,1))

This is my 100th attempt to place the range named "Ndep" or the range
"Trkdep" into the Vlookup. I've tried quotes, indirect references,
text(var) etc. etc.

Thanks if anyone can fix the riddle.
 
What are the possible variables that VLOOKUP
(L12,VehType,2,FALSE) will return (as your CHOOSE
statement will fail if VLOOKUP(L12,VehType,2,FALSE) does
not return 1 or 2)
 
Omit the quotes to make Excel see the names as range names rather than text:


=IF(G11<$R$15,VLOOKUP(1991,CHOOSE(VLOOKUP(L12,VehType,2,FALSE),Ndep,Trkdep),
2,FALSE),VLOOKUP(G11,TrkDep,2,FALSE))*F11*IF(H11="X",0,IF(H11="B",$V$17,1))


HTH
Charles
______________________
Decision Models
The Excel Calculation Site
www.DecisionModels.com
 
Back
Top