Q:

Search for last occurence of an duplicated item in a Range (Column)

Ok - here's a snap shot ... I have a table that contains the following:
id      pkey        id2     pkey3           pkey4   Countif-From    From Key Dependencies
205591  STE-79      211366  CALMS-14380     1       STE-79
203477  STE-2       212513  CALMS-14384     1       STE-2
205520  STCOVA-156  56174   CALMS-7175      1       STCOVA-156
205524  STCOVA-158  56174   CALMS-7175      2       STCOVA-156, STCOVA-158
205523  STG-577     56174   CALMS-7175      3       STG-577, STCOVA-158, STCOVA-156
203973  STB-914     204238  CON-6749        1       STB-914
166482  TV-388      159643  ET-14180        1       TV-388

I want to search this table matching on pkey3 - but the value I want to return is an item in the  'From Key Dependency' column (which is a concatenated list of the ALL the User Stories in the pkey column) that are related to the items in the pkey3 column. Example:
CALMS-7175 appears (3) times in the pkey column - I want to return a String that has ALL the related User Stories found in the pkey column separated by ','.
The challenge is ... index (match()) will return the FIRST occurrence of CALMS-7175 that it finds in the pkey column but what I really need is LAST occurrence of CALMS-7175 ... and the related 'From Key Dependency' column.
Observations?

A:

Use this to get the row containing the last instance of "CALMS-7175":
=LOOKUP(2,1/(D:D="CALMS-7175"),ROW(D:D))

