On Thu, Oct 18, 2012 at 4:43 PM, Russell Johnson <[email protected]> wrote: > > On Oct 18, 2012, at 4:28 PM, Aaron Burt <[email protected]> wrote: > >> On Thu, Oct 18, 2012 at 01:57:00PM -0700, Russell Johnson wrote: >>> I have a sheet with 4 columns. What I need is a formula that will compare >>> the value in column 3 and 4 to column 1, and return the value in column 2 >>> in the same row as column 1. >> >> Don't think I quite get what you're asking for, but here's a go: >> =if(or(A2>C2,A2>D2),B2,0) >> which does this: >> If column 1 is greater than column 3 or 4, return the value in column 2. >> Otherwise, return 0. >> (Note: I'm assuming there's a header in row 1.) > > Thanks for trying. :) > > It would be something like this: > > If the value in B3 or the value in B4 exists in column 1, return the value in > ?2 where ? is the row in column A where the value was found. > > Russell Johnson > [email protected]
I think the function you want is lookup, but I believe that sorting on col 1 is required. Also, what do want to do if B3 and B4 are not equal but both are in column 1? Syntax LOOKUP(SearchCriterion; SearchVector; ResultVector) SearchCriterion is the value to be searched for; entered either directly or as a reference. SearchVector is the single-row or single-column area to be searched. ResultVector is another single-row or single-column range from which the result of the function is taken. The result is the cell of the result vector with the same index as the instance found in the search vector. -Denis _______________________________________________ PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
