Using different range names in same function

R

Rob

i have requirement to lookup different ranges in the same
function depending on the day of operation ie vlookup
(a26,range,3,false)where range is one of three differing
ranges - am i able to use a cell reference to change the
range?
 
J

jer101

Rather than a VLookup function... you might consider the function calle
=sumproduct it does what VLookup does and so much more
 
T

Tom Ogilvy

you could use the indirect function to do the range or Offset or perhaps
Index

=vlookup(a26,offset(Sheet1!$A$1,a27,0,20,3),3,false)

A27 would hold the row offset from A1. You would replace the zero with a
cell reference for a column offset if needed.

or
using choose

=vlookup(a26,choose(A27,Sheet1!A1:C30,Sheet1!M20:O50,Sheet1!AA100:AC130),3,F
alse)

A27 would contain a 1, 2 or 3
 
Top