Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Gene
 
Posts: n/a
Default How can I automatically update column index number in VLookup whe.

If I insert a column in the range of a VLOOKUP Command, the range adjusts,
but the column index number does not.

Is there a work around for this?
  #2   Report Post  
RagDyer
 
Posts: n/a
Default

Use Column() in place of the index number.

For instance:

=VLOOKUP(E1,A1:D10,3,0)

Can be revised to:

=VLOOKUP(E1,A1:D10,COLUMN(C1),0)

Where Column(C1) represents the *third* column,
*NOT* Column C

For example:

=VLOOKUP(V1,W1:Z10,3,0)

Can be revised to:

=VLOOKUP(V1,W1:Z10,COLUMN(C1),0)

BUT, in this case, if you inserted a column between W and Z,
column C would *still* be column C, and therefore , *still* equate to 3 !

So, you'd have to try something like this:

=VLOOKUP(V1,W1:Z10,COLUMN(Y1)-22,0)
--

HTH,

RD
==============================================
Please keep all correspondence within the Group, so all may benefit!
==============================================

"Gene" wrote in message
...
If I insert a column in the range of a VLOOKUP Command, the range adjusts,
but the column index number does not.

Is there a work around for this?

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How can I automatically update column index number in VLookup whe.

A B C D E
Tom 1 All Number
Tom 1
Lucy 2
Jessy 3
Bill 4
Singer 5

In cell B2, type: =VLOOKUP(A1,D:E,COLUMNS(D1:E1),0)

Now you can do whatever you want to adjust.
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
Automatically enter date and time but only update once. PM New Users to Excel 3 January 21st 05 07:47 AM
Naming column in Index Function mlkpied Excel Worksheet Functions 3 December 7th 04 12:20 AM
vlookup change column index position - without changing formulae loopyloobyloo Excel Worksheet Functions 1 November 26th 04 01:35 PM
GET.CELL Biff Excel Worksheet Functions 2 November 24th 04 07:16 PM
Dynamic Column VlookUps Based on Week Number TLK40us Excel Worksheet Functions 3 November 14th 04 03:33 PM


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

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"