View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Luke M Luke M is offline
external usenet poster
 
Posts: 2,722
Default =IF(ISNA(VLOOKUP(A1,Data!$B$1:$C$200,MATCH(A1,Data !$A$1:$C$1,I

Oops, I switched the arguements. I meant to say if A1 *isn't* found in the
VLOOKUP table, it returns a 0, else it checks for B1.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Luke M" wrote:

Working from inside - out...
The first MATCH arguement is checking to see if A1 is located on Data sheet
in cells A1:C1. If V1 = 2, then it will search in descending order, else it
will search in ascending order.

This MATCH function then returns an integer that controls what column to
look at in the VLOOKUP function. If A1 is found in the VLOOKUP table, 0 is
returned. (The reason for the ISNA() arguement, and the overall IF function.)
If it is not found, the formula looks for B1 in the VLOOKUP table, with the
column to be check determined by a MATCH function, which looks in ascending
order.


Without looking at the sheet, it appears someone is trying to determine
which column of a data table to look at. However, if A1 is found within that
table, return 0. Else, find the correlating value.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"nv77078" wrote:

Someone sent me a file with this formula and I would like to know how it is
working and what it is trying to do:

=IF(ISNA(VLOOKUP(A1,Data!$B$1:$C$200,MATCH(A1,Data !$A$1:$C$1,IF($V1 =
2,-1,1)),)),0,VLOOKUP(B1,Data!$B$1:$C$200,MATCH(A1,Da ta!$A$1:$C$1),))

Thank you in advance.

Nancy