#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Vlookup

If I enter York in cell E2 I want Vlookup to be
=VLOOKUP(E2,York,2).
But if I enter Hereford in cell E2 the Vlookup formula must be
=VLOOKUP(E2,Hereford,2).
So, I need this part of the formula to change depending on what is in cell
E2. If there were only two variations I would use a nested formula? But I
have around 25 possibilities that I need to look up. Is there an easier way?

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 258
Default Vlookup

Equaliser --

The first cell of the VLOOKUP formula is the info you want to look up Inside
the lookup array. So you might set up cell E1 as the info you want to look
up, and cell E2 as the name of the array. Here are the steps:

1) Name the ranges for the lookup tables. Select them, then
InsertNameDefine to give them the names (like 'York' and 'Hereford').

2) Your formula would be
=VLOOKUP(E1,INDIRECT(E2),2)

Worked ok for me.

HTH

"Equaliser" wrote:

If I enter York in cell E2 I want Vlookup to be
=VLOOKUP(E2,York,2).
But if I enter Hereford in cell E2 the Vlookup formula must be
=VLOOKUP(E2,Hereford,2).
So, I need this part of the formula to change depending on what is in cell
E2. If there were only two variations I would use a nested formula? But I
have around 25 possibilities that I need to look up. Is there an easier way?

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup in vlookup - taking the result as array name SupperDuck Excel Worksheet Functions 2 June 2nd 07 11:05 AM
Combine VLOOKUP and IF function so #NA isn't returned as a value from VLOOKUP buffgirl71 Excel Discussion (Misc queries) 12 November 14th 06 11:36 PM
Vlookup -=VLOOKUP(F9,LookUp1!$A$2:$B$1504,2,FALSE) MikeR-Oz New Users to Excel 1 March 22nd 06 09:01 AM
IF(AND(val1=VLOOKUP( );val2>=VLOOKUP( );val2<=VLOOKUP( );VLOOKUP( Oso Excel Worksheet Functions 2 January 26th 05 06:56 AM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 09:39 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"