ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Column reference in Vlookup formula (https://www.excelbanter.com/excel-worksheet-functions/200291-column-reference-vlookup-formula.html)

Kevin K[_2_]

Column reference in Vlookup formula
 
There are time when I need to add column to the section of the spreadsheet
that I'm referencing in my vlookup formula. When I add a column, the vlookup
formula adjusts the range but it doesn't change (i.e. increment) the existing
column references so all of the data retrieved is bad because it's now
referencing the wrong column. Is there a way to fix this without doing a
massive 'find and replace'?

Gord Dibben

Column reference in Vlookup formula
 
Example only, your ranges may vary but by using the column() you can drag
across.

=VLOOKUP($G1,$A$2:$F$31,COLUMN()-6,FALSE) entered in F1


Gord Dibben MS Excel MVP

On Tue, 26 Aug 2008 12:01:05 -0700, Kevin K
wrote:

There are time when I need to add column to the section of the spreadsheet
that I'm referencing in my vlookup formula. When I add a column, the vlookup
formula adjusts the range but it doesn't change (i.e. increment) the existing
column references so all of the data retrieved is bad because it's now
referencing the wrong column. Is there a way to fix this without doing a
massive 'find and replace'?




All times are GMT +1. The time now is 01:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com