How to find first row where condition is true?
Improvement
Don't really need INDEX:
=MATCH(TRUE,MMULT(--(H2:J4888=K2:K4888),{1;1;1})<3,0)+1
Still array entered
--
Biff
Microsoft Excel MVP
"T. Valko" wrote in message
...
Maybe this array formula** :
=INDEX(ROW(K:K),MATCH(TRUE,MMULT(--(H2:J4888=K2:K4888),{1;1;1})<3,0)+1)
** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the
SHIFT key then hit ENTER.
--
Biff
Microsoft Excel MVP
"WhatsUp31415" wrote in message
...
Looking at rows 2:4888, I want to find the first row number "x" in which
OR(Hx<Kx,Ix<Kx,Jx<Kx) is true.
How can I write that formula in Excel 2003?
I tried the following array formula, to no avail:
=MIN(IF(OR(H2:H4888<K2:K4888,I2:I4888<K2:K4888,J 2:J4888<K2:K4888),ROW(G2:G4888)))
making sure that the condition is first true in row 4.
But that formula always returns 2.
I confirmed that the formula is an array formula enclosed in curly
braces.
Also, I filled a parallel column with =OR(H2<K2,I2<K2,J2<K2) and
copied down to confirm that the OR function first returns TRUE in row 4.
|