Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Daz9
 
Posts: n/a
Default How do I lookup a table from right to left ?

The Vlookup searches for a value in the leftmost column of a table, and then
returns a value in the same row from a column you specify in the table

Is is possible to use a lookup function to look up a value in the rightmost
column of a table and return a value in the same row from a column you
specify in the table (on the left hand side of the table) Basically the
reverse of the Vlookup

For example

I want to lookup the word black and return 5000

A B
1 5000 Black
2 1000 Red

  #2   Report Post  
Aladin Akyurek
 
Posts: n/a
Default

=INDEX($A$2:$A$3,MATCH("Red",$B$2:$B$3,0))

If the table is sorted on its match range (i.e., B2:B3) and the
approximate return values are admissible:

=INDEX($A$2:$A$3,MATCH("Red",$B$2:$B$3,1))

or

=LOOKUP("Red",$B$2:$B$3,$A$2:$A$3)

If the table is sorted on its match range (i.e., B2:B3) and the
approximate return values are NOT admissible:

=IF(LOOKUP("Red",$B$2:$B$3)="Red",LOOKUP("Red",$B$ 2:$B$3,$A$2:$A$3),"")

Daz9 wrote:
The Vlookup searches for a value in the leftmost column of a table, and then
returns a value in the same row from a column you specify in the table

Is is possible to use a lookup function to look up a value in the rightmost
column of a table and return a value in the same row from a column you
specify in the table (on the left hand side of the table) Basically the
reverse of the Vlookup

For example

I want to lookup the word black and return 5000

A B
1 5000 Black
2 1000 Red

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
How to create a lookup table with an added varable? GIZZMO Excel Worksheet Functions 3 April 6th 09 10:32 PM
lookup or table, not sure what to do [email protected] Excel Worksheet Functions 2 February 17th 05 10:36 PM
lookup misses the first entry in table Spunky Excel Worksheet Functions 1 January 17th 05 09:29 PM
Index table lookup anomaly Carole O Excel Worksheet Functions 9 December 9th 04 05:33 PM
Lookup Table Ben Excel Worksheet Functions 7 November 30th 04 08:05 PM


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