Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default Value in Next Row

I'm using a Vlookup function in cell A1 to return a value from a table. In A2
I would like the next item down on the same table to appear. What function
do I use in A2.

Using Excel 2003
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Value in Next Row

Details

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"JeffK" wrote in message
...
I'm using a Vlookup function in cell A1 to return a value from a table. In
A2
I would like the next item down on the same table to appear. What
function
do I use in A2.

Using Excel 2003


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Value in Next Row

=match(a1,sheet2!a:a,0)
will return the row number of the matching value in column A of sheet2 (for the
value in A1).

If your =vlookup() looked like:
=vlookup(a1,sheet2!a:b,2,false)
then you could replace that =vlookup() with a formula like:
=index(sheet2!b:b,match(a1,sheet2!a:a,0))
(but you don't need to--I only suggest it for consistency's sake.)

And to get the value of the cell under that matching row, you could use:
=index(sheet2!b:b,1+match(a1,sheet2!a:a,0))
(the =match() returns the row number of the match. The we add 1 to come down a
row.)



JeffK wrote:

I'm using a Vlookup function in cell A1 to return a value from a table. In A2
I would like the next item down on the same table to appear. What function
do I use in A2.

Using Excel 2003


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 53
Default Value in Next Row

Beautiful Dave, appreciate your help

"Dave Peterson" wrote:

=match(a1,sheet2!a:a,0)
will return the row number of the matching value in column A of sheet2 (for the
value in A1).

If your =vlookup() looked like:
=vlookup(a1,sheet2!a:b,2,false)
then you could replace that =vlookup() with a formula like:
=index(sheet2!b:b,match(a1,sheet2!a:a,0))
(but you don't need to--I only suggest it for consistency's sake.)

And to get the value of the cell under that matching row, you could use:
=index(sheet2!b:b,1+match(a1,sheet2!a:a,0))
(the =match() returns the row number of the match. The we add 1 to come down a
row.)



JeffK wrote:

I'm using a Vlookup function in cell A1 to return a value from a table. In A2
I would like the next item down on the same table to appear. What function
do I use in A2.

Using Excel 2003


--

Dave Peterson

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



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