Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lookup non-ascending values in a column 3

Status
Not open for further replies.

markappleby

IS-IT--Management
Feb 4, 2004
16
GB
I have been attempting to look up a value (e.g. 4) from a column of numbers whose values are not in ascending order, in order to return a value from an adjacent column. The numbers are input into this column and can not be data sorted to be ascending. I know I can retrieve the value in the adjacent column by using the OFFSET and MATCH functions but was wondering if there was an easier way to do this.
I know LOOKUP, VLOOKUP and HLOOKUP all require ascending values.
Could anyone please help.
 
Hi,

by adding
Code:
,FALSE
to your
Code:
=VLOOKUP
it will not require sorting.

Code:
=VLOOKUP(Crieria,Range,Column,FALSE)

If you can post a little more info and a sample of your data we maybe able to assist further.


Leigh Moore
Solutions 4 MS Office Ltd
 
Thanks Leigh,

I have a list of names of lorry drivers in A2:A24, which remains static, and the round number to which they are delivering is input into C2:C24. The round numbers will obviously vary numerically from 1 to 22. Another workbook will lookup which row in C2:C24 contains, for example 4, and I want the corresponding lorry drivers name to be returned to the workbook.
Your help is much appreciated.
 
=INDEX(A2:C24,MATCH(<Your reference>,C2:C24,0),1)

<Your Reference> is the cell containing the value you want to look up.



[Blue]Blue[/Blue] [Dragon]

If I wasn't Blue, I would just be a Dragon...
 
Right ok,

Try this, it seems to work with my sample data.

D11 was my Round number, drivers in Col B and Round in Col C.

Code:
=INDEX(B3:C8,MATCH(D11,C3:C8,0),1)

Hope this helps.

Leigh Moore
Solutions 4 MS Office Ltd
 
Thanks Leigh and Bluedragon2 - works perfectly.

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top