LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,104
Default How to find first row where condition is true?

You cannot use logical functions in an array formula
This gives the row of the first line where H, I OR J do not equal K
=MIN(IF(((H2:H14<K2:K14)+(I2:I14<K2:K14)+(J2:J14 <K2:K14)),ROW(K2:K14),10^99))
enter as array formula, of course
change + to - to find the fist row where H, I AND J do not equal K
best wishes
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"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.



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide Rows If Condition True wilbursj Excel Worksheet Functions 2 April 20th 09 08:09 PM
result if a condition is NOT true? Roland Excel Worksheet Functions 2 March 7th 07 09:25 AM
Continually check if condition is true in VBA [email protected] Excel Discussion (Misc queries) 1 October 4th 06 05:43 PM
TRUE condition??? pmguerra Excel Discussion (Misc queries) 2 June 5th 06 04:27 PM
How Do I Hide A Row (if a condition is true) using a Macro ? Anthony Fantone Excel Worksheet Functions 1 June 16th 05 04:54 PM


All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"