Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Lookup value with items in different rows

I am having trouble putting together a function that will lookup a given
value but return an associated value in a different row. i have tried
combinations of vlookup and offset to no avail.

To illustrate here is an example.

My table is set up as follows

A B
1 apple 10
2 20
3 30
4 pear 5
5 7
6 9

I would like to be able to lookup "apple" but instead of returning "10" I
need to return "20." Similarly, if I looked up "pear" i would need to return
"7" not "5."

Any help would be much appreciated.

Thank you in advance.

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default Lookup value with items in different rows

=INDEX(B1:B6,MATCH("pear",A1:A6,0)+1)


"clubin" wrote:

I am having trouble putting together a function that will lookup a given
value but return an associated value in a different row. i have tried
combinations of vlookup and offset to no avail.

To illustrate here is an example.

My table is set up as follows

A B
1 apple 10
2 20
3 30
4 pear 5
5 7
6 9

I would like to be able to lookup "apple" but instead of returning "10" I
need to return "20." Similarly, if I looked up "pear" i would need to return
"7" not "5."

Any help would be much appreciated.

Thank you in advance.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Lookup value with items in different rows

Check your other post.

clubin wrote:

I am having trouble putting together a function that will lookup a given
value but return an associated value in a different row. i have tried
combinations of vlookup and offset to no avail.

To illustrate here is an example.

My table is set up as follows

A B
1 apple 10
2 20
3 30
4 pear 5
5 7
6 9

I would like to be able to lookup "apple" but instead of returning "10" I
need to return "20." Similarly, if I looked up "pear" i would need to return
"7" not "5."

Any help would be much appreciated.

Thank you in advance.


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8
Default Lookup value with items in different rows

Perfect, thank you!

"Teethless mama" wrote:

=INDEX(B1:B6,MATCH("pear",A1:A6,0)+1)


"clubin" wrote:

I am having trouble putting together a function that will lookup a given
value but return an associated value in a different row. i have tried
combinations of vlookup and offset to no avail.

To illustrate here is an example.

My table is set up as follows

A B
1 apple 10
2 20
3 30
4 pear 5
5 7
6 9

I would like to be able to lookup "apple" but instead of returning "10" I
need to return "20." Similarly, if I looked up "pear" i would need to return
"7" not "5."

Any help would be much appreciated.

Thank you in advance.

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default Lookup value with items in different rows

I think I prefer the rudeness of not responding at all to multi posting.
Please don't do it.

"clubin" wrote:

Perfect, thank you!

"Teethless mama" wrote:

=INDEX(B1:B6,MATCH("pear",A1:A6,0)+1)


"clubin" wrote:

I am having trouble putting together a function that will lookup a given
value but return an associated value in a different row. i have tried
combinations of vlookup and offset to no avail.

To illustrate here is an example.

My table is set up as follows

A B
1 apple 10
2 20
3 30
4 pear 5
5 7
6 9

I would like to be able to lookup "apple" but instead of returning "10" I
need to return "20." Similarly, if I looked up "pear" i would need to return
"7" not "5."

Any help would be much appreciated.

Thank you in advance.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 35,218
Default Lookup value with items in different rows

But if you notice that the multipost, you may want to warn others--especially if
there are responses at the other post(s).



Mike H wrote:

I think I prefer the rudeness of not responding at all to multi posting.
Please don't do it.

"clubin" wrote:

Perfect, thank you!

"Teethless mama" wrote:

=INDEX(B1:B6,MATCH("pear",A1:A6,0)+1)


"clubin" wrote:

I am having trouble putting together a function that will lookup a given
value but return an associated value in a different row. i have tried
combinations of vlookup and offset to no avail.

To illustrate here is an example.

My table is set up as follows

A B
1 apple 10
2 20
3 30
4 pear 5
5 7
6 9

I would like to be able to lookup "apple" but instead of returning "10" I
need to return "20." Similarly, if I looked up "pear" i would need to return
"7" not "5."

Any help would be much appreciated.

Thank you in advance.


--

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lookup duplicate items in a list Niall Excel Worksheet Functions 5 September 6th 08 03:06 AM
Lookup match 2 items HFC-SC New Users to Excel 4 August 17th 06 07:58 AM
Using the lookup Function for similar items to add together Brian Excel Worksheet Functions 1 July 13th 06 05:23 AM
Lookup items and have picture appear together. WL Excel Worksheet Functions 6 March 14th 06 03:32 PM
Sum items in a lookup table. JICDB Excel Discussion (Misc queries) 2 December 30th 05 02:13 PM


All times are GMT +1. The time now is 08:36 AM.

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"