[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

LOOKUP value when range of values is not sorted or in order in Excel

Posted on 2011-02-28
4
Medium Priority
?
209 Views
Last Modified: 2012-05-11
Hello,

What is the best way to look up a value in an Excel (2007) spreadsheet when the range containing the value cannot be sorted and/or contains a variety of different types of entries (text, numbers, etc.)?

I have tried several different things but I keep getting #REF! as the result.

Thanks
0
Comment
Question by:Steve_Brady
  • 2
4 Comments
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 35003000
use vlookup() or match() . . .
vlookup() with the last parameter as a zero (or false)...
0
 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 35003003
Hello Steve,

What do you want to do when the value is found? A standard VLOOKUP with FALSE as the last argument doesn't require anything to be sorted. For example to lookup A2 in C2:C10 and return the corresponding value from D2:D10

=VLOOKUP(A2,C2:D10,2,FALSE)

A2 must match in terms of format, e.g. if A2 is a text formatted number then the match in column C must also be text-formatted etc.

regards, barry
0
 
LVL 6

Expert Comment

by:FernandoFernandes
ID: 35003008
example:

=VLOOKUP(A1,B1:Z1000,15,0)
or
=VLOOKUP(A1,B1:Z1000,15,FALSE)
or if you only want to see the row where it is...
=MATCH(A1,B1:B1000,0)
0
 

Author Comment

by:Steve_Brady
ID: 35158092
Thanks for the responses.

barryhoudini:
>>A2 must match in terms of format, e.g. if A2 is a text formatted number then the match in column C must also be text-formatted etc.


Yes, I tried =VLOOKUP but had the same problem.  However, I wasn't aware of the requirement to match formatting.  That was the problem.

Thanks Barry!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question