Home |
Search |
Today's Posts |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
"animal" is a defined name range (eg. B2:B100)
"result" is a defined name range (eg. A2:A100) In C2: =IF(ISERR(SMALL(IF(animal="Cat",ROW(INDIRECT("1:"& ROWS(result)))),ROWS($1:1))),"",INDEX(result,SMALL (IF(animal="Cat",ROW(INDIRECT("1:"&ROWS(result)))) ,ROWS($1:1)))) ctrl+shift+enter, not just enter copy down as far as needed or you can use this formula In C2: =IF(COUNTIF(animal,"Cat")=ROWS($1:1),INDEX(result ,SMALL(IF(animal="Cat",ROW(animal)-MIN(ROW(animal))+1),ROWS($1:1))),"") ctrl+shift+enter, not just enter copy down as far as needed "ADean" wrote: I'm trying to find a formula that will continue to search for a row that meets the specified IF criteria without returning the rows that do not. i.e. I want the below reference range to provide the following based off of an IF statement. (the actual solution needs to work for hundreds of rows) 1 Cat 2 Dog 3 Cat 4 Dog 5 Cat Results: 1 3 5 |