Excel - select value from first and last row with value in another column

Solution 1:

Use INDEX and MATCH functions to extract the data.

  • To extract the first workplace:
=INDEX($A$3:$A$16,MATCH($E3,$B$3:$B$16,0))

Formula for first cell

  • To extract the last workplace:
=INDEX($A$3:$A$16,MATCH($E3,$B$3:$B$16,1))

Formula for last cell

Drag the formula down to fill the other cells. Adapt it to match your sheets, tables and ranges.