ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Vlookup return multiple columns (https://www.excelbanter.com/excel-worksheet-functions/46129-vlookup-return-multiple-columns.html)

Matt Cromer

Vlookup return multiple columns
 
Is there something that I can type in the "return column" part of the formula
that will make the formula dynamic as I copy it to the right it will return
column 2, then 3 in the next column and 4 in the following column?

bj

Use the column() function
if your first equation is in Column D and you would normally put 2 for the
first return column try
=vlookup(value,range,column()-2,false)

do

"Matt Cromer" wrote:

Is there something that I can type in the "return column" part of the formula
that will make the formula dynamic as I copy it to the right it will return
column 2, then 3 in the next column and 4 in the following column?


Richard Buttrey

On Mon, 19 Sep 2005 11:19:08 -0700, "Matt Cromer"
wrote:

Is there something that I can type in the "return column" part of the formula
that will make the formula dynamic as I copy it to the right it will return
column 2, then 3 in the next column and 4 in the following column?


Make the return part of the formula

column()

You might need to add in a constant if your data doesn't start in
column A. e.g.

=vlookup("whatever",myrange,column()-1)

HTH
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________

Matt Cromer

Thanks that helps!

"Richard Buttrey" wrote:

On Mon, 19 Sep 2005 11:19:08 -0700, "Matt Cromer"
wrote:

Is there something that I can type in the "return column" part of the formula
that will make the formula dynamic as I copy it to the right it will return
column 2, then 3 in the next column and 4 in the following column?


Make the return part of the formula

column()

You might need to add in a constant if your data doesn't start in
column A. e.g.

=vlookup("whatever",myrange,column()-1)

HTH
__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________



All times are GMT +1. The time now is 10:34 PM.

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