ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Using different range names in same function (https://www.excelbanter.com/excel-programming/301795-using-different-range-names-same-function.html)

Rob

Using different range names in same function
 
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?

jer101[_7_]

Using different range names in same function
 
Rather than a VLookup function... you might consider the function calle
=sumproduct it does what VLookup does and so much more

--
Message posted from http://www.ExcelForum.com


Tom Ogilvy

Using different range names in same function
 
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,fals e)

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:O 50,Sheet1!AA100:AC130),3,F
alse)

A27 would contain a 1, 2 or 3

--
Regards,
Tom Ogilvy



"Rob" wrote in message
...
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?





All times are GMT +1. The time now is 01:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com