View Single Post
  #4   Report Post  
Mfreit Mfreit is offline
Junior Member
 
Posts: 3
Default

joeu2004,

Thank you so much, that worked like a charm. Can't tell you how frustrating that formula had been for me. And it's good to know about the OR function not working in functions of that type.

Cheers,

M


Quote:
Originally Posted by joeu2004[_2_] View Post
"Mfreit"

There are two potential problems:

1. Formulas of that form must be array-entered, which means you must press
ctrl+shift+Enter instead of just Enter.

2. OR() does not work as intended in formulas of that form. You want to
process row by row, but OR() will process the entire array argument, even if
the formula is array-entered.

An array-entered formula of the following form should do what you want
(press ctrl+shift+Enter instead of just Enter):

=MIN(IF((B1:B1000=Sheet2!X1)+(C1:C1000=Sheet2!X2) 0,A1:A1000))

Each comparison returns TRUE or FALSE. The arithmetic operation (plus)
converts TRUE and FALSE into 1 and 0. The above conditional expression is
zero only if both comparisons are FALSE row by row.