Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 70
Default vlookup with different col_index_num

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default vlookup with different col_index_num

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


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default vlookup with different col_index_num

Sorry, I got that the wrong way round. Try it this way:

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

Hope this helps.

Pete

On Aug 17, 9:34*am, 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- Hide quoted text -


- Show quoted text -


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TGV TGV is offline
external usenet poster
 
Posts: 63
Default vlookup with different col_index_num

I think u can go for Dsum. For more details about DSUM see help.
--
If this post helps, pls click Yes
---------------
TGV


"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

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
TGV TGV is offline
external usenet poster
 
Posts: 63
Default vlookup with different col_index_num

By mistake i have mentioned DSUM it's not DSUM it's DGET.
--
If this post helps, pls click Yes
---------------
TGV


"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



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
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



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default vlookup with different col_index_num

Yes, have a look at Jacob's solution.

I can amend your formula if you post it here, and if you can give me
details of the cell references used for your table.

Pete

On Aug 17, 10:52*am, ArcticWolf
wrote:
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- Hide quoted text -


- Show quoted text -


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 and using a Name in the col_index_num Beans Excel Worksheet Functions 2 July 24th 09 09:39 PM
changing the vlookup col_index_num dawn Excel Worksheet Functions 5 April 10th 09 07:49 PM
VLOOKUP need to increment col_index_num Kia Excel Discussion (Misc queries) 6 August 26th 08 10:45 PM
vlookup - Col_index_num xyz Excel Discussion (Misc queries) 10 December 6th 07 04:18 PM
Vlookup Col_index_num Mort Australia Excel Discussion (Misc queries) 5 March 24th 06 10:37 AM


All times are GMT +1. The time now is 10:18 AM.

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

About Us

"It's about Microsoft Excel"