Lookup Function

A

Andrew

I need to write a function that will do the following:

Look at cell A1 in sheet 1
See if it's in a range from A1:B30 in sheet 3
Return either True or False

I've tried the Vlookup and the Lookup functions but they
just return the nearest value. Can someone help me out?

Thanks,

Andrew
 
N

Niek Otten

Hi Andrew,

Use Vlookup. You probably omitted the fourth argument; it defaults to TRUE;
set it to FALSE. This will cause Excel to find an exact match instead of the
nearest.
So your formula would result in something like

=IF(ISNA(VLOOKUP(B1,A1:A4,1,FALSE)),FALSE(),TRUE())

--

Kind Regards,

Niek Otten

Microsoft MVP - Excel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top