View Single Post
  #5   Report Post  
Harlan Grove
 
Posts: n/a
Default

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)))