View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Peter Huang [MSFT] Peter Huang [MSFT] is offline
external usenet poster
 
Posts: 225
Default Similar to VLOOKUP?

Hi

From VLOOKUP help,
Lookup_value The value to search in the first column of the table array
(array: Used to build single formulas that produce multiple results or that
operate on a group of arguments that are arranged in rows and columns. An
array range shares a common formula; an array constant is a group of
constants used as an argument.). Lookup_value can be a value or a
reference. If lookup_value is smaller than the smallest value in the first
column of table_array, VLOOKUP returns the #N/A error value.

The first parameter it wants is a value not a value list.

Also what is your end goal?
=VLOOKUP(E3:F3,'Sheet2'!A4:B430,1,FALSE)
e.g.
E3:F3 = 5 6

So you want to search for "5 6" two cells pattern in A4:B430
i.e. if A7:A8 = 5 6, so it will match
Or do you want to just match 5 or 6 in the A4:B430?

I think you may to write a macro to do the job.
Here is KB for your reference.
141762 XL: How to Use Looping Structures in Visual Basic for Applications
http://support.microsoft.com/?id=141762




Best regards,

Peter Huang
Microsoft Online Partner Support

Get Secure! - www.microsoft.com/security
This posting is provided "AS IS" with no warranties, and confers no rights.