ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   vlookup and named ranges (https://www.excelbanter.com/excel-worksheet-functions/6705-vlookup-named-ranges.html)

chathag

vlookup and named ranges
 

Hi All,

I have 2 cell ranges named "maindata" and "otherdata", which are used
in a vlookup. Depending on the status of of the lookup value, the
Table Array would have to be either "maindata" or "otherdata". I have
therefore entered maindata and otherdata into the cells f1 and f2
respectively. This would avoid having to retype the Table Array,
instead pointing the Table Array to either cell f1 or f2. When I try
this, a N/A is returned can somebody please advise whether this is
possible to do?

regards

G.


--
chathag
------------------------------------------------------------------------
chathag's Profile: http://www.excelforum.com/member.php...o&userid=16519
View this thread: http://www.excelforum.com/showthread...hreadid=318767


Frank Kabel

Hi
use
INDIRECT(F2)
in your VLOOKUP formula

"chathag" wrote:


Hi All,

I have 2 cell ranges named "maindata" and "otherdata", which are used
in a vlookup. Depending on the status of of the lookup value, the
Table Array would have to be either "maindata" or "otherdata". I have
therefore entered maindata and otherdata into the cells f1 and f2
respectively. This would avoid having to retype the Table Array,
instead pointing the Table Array to either cell f1 or f2. When I try
this, a N/A is returned can somebody please advise whether this is
possible to do?

regards

G.


--
chathag
------------------------------------------------------------------------
chathag's Profile: http://www.excelforum.com/member.php...o&userid=16519
View this thread: http://www.excelforum.com/showthread...hreadid=318767



chathag


Thanks for that, but how would i implement the INDIRECT function into
the VLOOKUP.


--
chathag
------------------------------------------------------------------------
chathag's Profile: http://www.excelforum.com/member.php...o&userid=16519
View this thread: http://www.excelforum.com/showthread...hreadid=318767


Frank Kabel

Hi
=VLOOKUP(lookup_value,INDIRECT(F2),2,0)
for example

--
Regards
Frank Kabel
Frankfurt, Germany

"chathag" schrieb im Newsbeitrag
...

Thanks for that, but how would i implement the INDIRECT function into
the VLOOKUP.


--
chathag
---------------------------------------------------------------------

---
chathag's Profile:

http://www.excelforum.com/member.php...o&userid=16519
View this thread:

http://www.excelforum.com/showthread...hreadid=318767




All times are GMT +1. The time now is 02:07 PM.

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