vlookup question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to copy a vlookup formula to the next column and have the col_index_num adjust automatically

example of original vlookup formula is in cell C2, looking up the value in cell A2, table-array is A25:M25 and is using col_index
=vlookup(A2,A25:M25,2

when I copy the formula to cell D2, I want it to use the same lookup value and table-array, but col_index

I want to copy the formula like this 12 times and don't want to have to edit the col_index number each time I copy it - it there a way to make the col_index adjust automatically?
 
Good afternoon -

You can use the Column() function to replace the column index number.
In this case you would need to use column()-1 in place of the column index number,
if I understand your layout.

=vlookup(A2,A25:M25,2) would be

=vlookup(A2,A25:M25,column()-1) if this formula is in column C.


Please let me know if you need further help with this issue.

Thanks,
Jon Barchenger




--------------------
**Thread-Topic: vlookup question
**thread-index: AcO7SmqbUiRzx14URyCgvnS3nTjv/A==
**X-Tomcat-NG: microsoft.public.excel.worksheet.functions
**From: "=?Utf-8?B?anVkeQ==?=" <[email protected]>
**Subject: vlookup question
**Date: Fri, 5 Dec 2003 08:11:18 -0800
**Lines: 8
**Message-ID: <[email protected]>
**MIME-Version: 1.0
**Content-Type: text/plain;
** charset="Utf-8"
**Content-Transfer-Encoding: 7bit
**X-Newsreader: Microsoft CDO for Windows 2000
**Content-Class: urn:content-classes:message
**Importance: normal
**Priority: normal
**X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
**Newsgroups: microsoft.public.excel.worksheet.functions
**NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
**Path: cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl
**Xref: cpmsftngxa07.phx.gbl microsoft.public.excel.worksheet.functions:175179
**X-Tomcat-NG: microsoft.public.excel.worksheet.functions
**
**Is there a way to copy a vlookup formula to the next column and have the col_index_num adjust automatically



example of original vlookup formula is in cell C2, looking up the value in cell A2, table-array is A25:M25 and is using col_index

=vlookup(A2,A25:M25,2



when I copy the formula to cell D2, I want it to use the same lookup value and table-array, but col_index



I want to copy the formula like this 12 times and don't want to have to edit the col_index number each time I copy it - it there a way to make the col_index
adjust automatically?
**
 
Back
Top