#1   Report Post  
Pawan
 
Posts: n/a
Default vlookup

Hi,

I have a sheet with 52 columns and 250 rows. First column contains student's
name. I am using VLOOKUP function so that when I enter name of student, all
his data will be displayed in that row. For that I have to write VLOOKUP
formula for each cell in that row. But then I have to write parameter
"col_index_num" manually in each cell of that row. Is there any way so that
when I write formula for one cell, and after dragging it over the entire row,
"col_index_num" will change correspondingly for all cells in that row?
  #2   Report Post  
N Harkawat
 
Posts: n/a
Default

=vlookup(lookupvalue,lookuprange,column(),0)


"Pawan" wrote in message
...
Hi,

I have a sheet with 52 columns and 250 rows. First column contains
student's
name. I am using VLOOKUP function so that when I enter name of student,
all
his data will be displayed in that row. For that I have to write VLOOKUP
formula for each cell in that row. But then I have to write parameter
"col_index_num" manually in each cell of that row. Is there any way so
that
when I write formula for one cell, and after dragging it over the entire
row,
"col_index_num" will change correspondingly for all cells in that row?



  #3   Report Post  
bj
 
Posts: n/a
Default

if you start in Column A
=vlookup(name,datarange,column())

"Pawan" wrote:

Hi,

I have a sheet with 52 columns and 250 rows. First column contains student's
name. I am using VLOOKUP function so that when I enter name of student, all
his data will be displayed in that row. For that I have to write VLOOKUP
formula for each cell in that row. But then I have to write parameter
"col_index_num" manually in each cell of that row. Is there any way so that
when I write formula for one cell, and after dragging it over the entire row,
"col_index_num" will change correspondingly for all cells in that row?

  #4   Report Post  
Duke Carey
 
Posts: n/a
Default

Instead of using a digit to represent the column # you want, use COLUMN(),
which provides the column number for the cell in which it appears. For
example, if your formula is in col C (the 3rd column), and you want to get
data in the 2d column from the lookup table, use COLUMN()-1


"Pawan" wrote:

Hi,

I have a sheet with 52 columns and 250 rows. First column contains student's
name. I am using VLOOKUP function so that when I enter name of student, all
his data will be displayed in that row. For that I have to write VLOOKUP
formula for each cell in that row. But then I have to write parameter
"col_index_num" manually in each cell of that row. Is there any way so that
when I write formula for one cell, and after dragging it over the entire row,
"col_index_num" will change correspondingly for all cells in that row?

  #5   Report Post  
Kevin M
 
Posts: n/a
Default

Pawan, unfortunately that's the only part of a LOOKUP that will not change by
autofilling. What you can do though, is to add an additional row on top of
your data, then modify your VLOOKUP to include a quick formula to add the
number from that new row into your Index Number.. So:

=VLOOKUP($A$1,Array,0+B1,FALSE)

This will modify your Index number to show you the sum of 0 and B1, so if
you enter a 1 in B1 your Index Number will show 1, once you autofill that
over and fill in your new row with 1,2,3,4,5,6,7,8,9...51 it'll pull the new
Index Number.

HTH,

Kevin M
MOS Excel Specialist

"Pawan" wrote:

Hi,

I have a sheet with 52 columns and 250 rows. First column contains student's
name. I am using VLOOKUP function so that when I enter name of student, all
his data will be displayed in that row. For that I have to write VLOOKUP
formula for each cell in that row. But then I have to write parameter
"col_index_num" manually in each cell of that row. Is there any way so that
when I write formula for one cell, and after dragging it over the entire row,
"col_index_num" will change correspondingly for all cells in that row?



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
Have Vlookup return a Value of 0 instead of #N/A Mr Mike Excel Worksheet Functions 4 May 25th 05 04:51 PM
Array Function with VLOOKUP CoRrRan Excel Worksheet Functions 15 April 8th 05 05:54 PM
vlookup data hidden within worksheet Excel Worksheet Functions 0 January 26th 05 12:09 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM
VLOOKUP not working Scott Excel Worksheet Functions 3 November 12th 04 08:06 PM


All times are GMT +1. The time now is 07:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"