Retrieving Header of last not empty cell using unique identified?

Copper Contributor

I want Excel to return the row header of the last populated (not empty) cell in a row associated with a given unique value. Is this possible?

 

example: The status cell should reflect "Routing"

 

ID DescDraftedReady Routing Approved
1ABCYesYesYes 
2RSTYesYes  
3XYZYesYesYesYes
      
 IDStatus   
 1???   
2 Replies

@_aeung 

=INDEX(1:1,MATCH(REPT("z",255),INDEX(1:1048576,MATCH(B7,A:A,0),0)))