View Single Post
  #6   Report Post  
Ashish Mathur
 
Posts: n/a
Default

Hi,

Assuming you have data in range A1:B7 and the value you want data for (from
the range above) in cell A10, type the following array formula
(Ctrl+Shift+Enter)

=IF(ISERROR(INDEX($A$1:$B$7,SMALL(IF($A$1:$A$7=$A$ 10,ROW($A$1:$A$7)),ROW(1:1)),2)),"",INDEX($A$1:$B$ 7,SMALL(IF($A$1:$A$7=$A$10,ROW($A$1:$A$7)),ROW(1:1 )),2))

Please keep inmind that your list must start from row 1

Regards,

"Harlan Grove" wrote:

Bernie Deitrick wrote...
....
However, if you need to extract the values to another table,
you can use an array formula (entered using Ctrl-Shift-Enter) like:

=INDEX($E$1:$E$10,LARGE(($D$1:$D$10="Test")*ROW($ D$1:$D$10),ROW(D1)))

....

LARGE would return the matches in reversed order. Replace the LARGE
call with a SMALL call to fetch the matches in the original order.
Of course, the reason why you had to use LARGE was that your first
argument to LARGE would return zeros for nonmatches, and you had to
avoid them. Using SMALL would require using an IF call, but since the
formula would need to be array-entered, no big deal.

=INDEX($E$1:$E$10,SMALL(IF($D$1:$D$10="Test",ROW($ D$1:$D$10)),
ROWS(D$1:D1)))