Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default VLookup Column Reference - can it increment when copying to subseq

I have a need to do a VLOOKUP in twenty columns on the destination sheet. I
want to pull 20 columns of data in exactly the same order onto the
destination sheet from the original sheet. I know the range can be made
relative or absolute, but I'd like the column index number to increment when
I copy my formula into the next cell to the right. Does anyone know how to
do this quickly and easily instead of going in and manually changing the
column index number in each formula across the sheet. Example
VLOOKUP($A2,Sheet2!$A$1:$Z$26,2,FALSE) in the first cell then
($A2,Sheet2!$A$1:$Z$26,3,FALSE) in the next cell to the right. Note the
column index number changed from 2 to 3.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default VLookup Column Reference - can it increment when copying to subseq

Hello,

you can use the column index number refering to a cell
and on that cell use =counta(sheet2!1:1)

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"Nicky Armstrong" escreveu:

I have a need to do a VLOOKUP in twenty columns on the destination sheet. I
want to pull 20 columns of data in exactly the same order onto the
destination sheet from the original sheet. I know the range can be made
relative or absolute, but I'd like the column index number to increment when
I copy my formula into the next cell to the right. Does anyone know how to
do this quickly and easily instead of going in and manually changing the
column index number in each formula across the sheet. Example
VLOOKUP($A2,Sheet2!$A$1:$Z$26,2,FALSE) in the first cell then
($A2,Sheet2!$A$1:$Z$26,3,FALSE) in the next cell to the right. Note the
column index number changed from 2 to 3.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default VLookup Column Reference - can it increment when copying to subseq

Assume you enter the first formula in cell B2.

=VLOOKUP($A2,Sheet2!$A$1:$Z$26,COLUMNS($A2:B2),0)

Copy across as needed.

--
Biff
Microsoft Excel MVP


"Nicky Armstrong" wrote in
message ...
I have a need to do a VLOOKUP in twenty columns on the destination sheet.
I
want to pull 20 columns of data in exactly the same order onto the
destination sheet from the original sheet. I know the range can be made
relative or absolute, but I'd like the column index number to increment
when
I copy my formula into the next cell to the right. Does anyone know how
to
do this quickly and easily instead of going in and manually changing the
column index number in each formula across the sheet. Example
VLOOKUP($A2,Sheet2!$A$1:$Z$26,2,FALSE) in the first cell then
($A2,Sheet2!$A$1:$Z$26,3,FALSE) in the next cell to the right. Note the
column index number changed from 2 to 3.



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default VLookup Column Reference - can it increment when copying to subseq

Change your formula to this:

=VLOOKUP($A2,Sheet2!$A$1:$Z$26,COLUMN(B1),FALSE)

copy it across and the COLUMN(B1) (returning 2) becomes COLUMN(C1),
COLUMN(D1) etc.

Hope this helps.

Pete

"Nicky Armstrong" wrote in
message ...
I have a need to do a VLOOKUP in twenty columns on the destination sheet.
I
want to pull 20 columns of data in exactly the same order onto the
destination sheet from the original sheet. I know the range can be made
relative or absolute, but I'd like the column index number to increment
when
I copy my formula into the next cell to the right. Does anyone know how
to
do this quickly and easily instead of going in and manually changing the
column index number in each formula across the sheet. Example
VLOOKUP($A2,Sheet2!$A$1:$Z$26,2,FALSE) in the first cell then
($A2,Sheet2!$A$1:$Z$26,3,FALSE) in the next cell to the right. Note the
column index number changed from 2 to 3.



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
Increment cell reference Larry Kahm Excel Discussion (Misc queries) 1 April 8th 08 01:40 AM
copying a column reference into a row lars1028 Excel Discussion (Misc queries) 4 June 26th 06 10:17 PM
VLookup using 2 worksheets, whole column reference ROSIE Excel Worksheet Functions 1 February 22nd 06 12:50 AM
Relative reference autofill increment other than +1 SteveB Excel Discussion (Misc queries) 3 June 14th 05 07:40 PM
Row reference increment but preserve column reference Pwanda Excel Worksheet Functions 1 April 28th 05 01:12 PM


All times are GMT +1. The time now is 09:34 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"