View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
paul
 
Posts: n/a
Default If Statement linked to cell with VLOOKUP problem - getting wrong v

VLOOKUP(lookup_value,table_array,col_index_num,ran ge_lookup
vlookup has four arguments and needs to be sorted for it to work properly
unless you know you are looking for exact matches,then you use the "false"
version

Range_lookup A logical value that specifies whether you want VLOOKUP to
find an exact match or an approximate match:

If TRUE or omitted, an exact or approximate match is returned. If an exact
match is not found, the next largest value that is less than lookup_value is
returned.
The values in the first column of table_array must be placed in ascending
sort order; otherwise, VLOOKUP may not give the correct value. You can put
the values in ascending order by choosing the Sort command from the Data menu
and selecting Ascending. For more information, see Default sort orders.

If FALSE, VLOOKUP will only find an exact match. In this case, the values in
the first column of table_array do not need to be sorted. If there are two or
more values in the first column of table_array that match the lookup_value,
the first value found is used. If an exact match is not found, the error
value #N/A is returned.
Remarks

--
paul
remove nospam for email addy!



"Mike R." wrote:

Hi,
I have a simple IF statement that is =IF(A1A2,A1,A2). The cell A1 is a
VLOOKUP to get the value. This seems to be giving me a false answer in my If
statement and it always equals the value in A1. If I just type in the value
of A1 (to test it), the If statement works properly.... help.
Mike