View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ArcticWolf ArcticWolf is offline
external usenet poster
 
Posts: 70
Default vlookup with different col_index_num

Thanks for the quick response Pete. Can I be a pain and ask you to amend my
original vlookup as I'm having difficulty placing the MATCH function into it
without getting an error. I'm trying to replace the "3" with the match
function, is this correct?

Thanks,

AW

"Pete_UK" wrote:

You could use MATCH on the column headings to return the column
number, so instead of your 3 you would have something like:

MATCH(A$1:D$1,"heading",0)

If columns are inserted between A and D the formula will automatically
adjust.

Hope this helps.

Pete

On Aug 17, 9:17 am, 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