View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default vlookup with different col_index_num

Both the below formulas return the same;

Col A Col B Col C Col D
Rank Name Office
1 Tom R Bath =VLOOKUP(3,A:C,2,0)
2 Katy C Bath =VLOOKUP(3,A:C,MATCH("Name",1:1,0),0)
3 Nigel G Bath
4 Pete R Bath
5 Tony A London
6 John B London
7 Mary C London
8 Jane D London


If this post helps click Yes
---------------
Jacob Skaria


"ArcticWolf" wrote:

Hi,

I have a vlookup which returns the value from a table called data. The
column I want from the table is column 3, so =vlookup(a1,data,3,false)

However, the table will expand over the coming months with new columns
inserted before the 3rd column in the data table. This will make my lookup
incorrect as the data I want is not in column 3 (but in 4 or 5 etc...)

The column heading will always remain the same (if that is of use?), so how
can I get Excel to find the column I need as opposed to using the
col_index_num?

TIA,

AW