Thử công thức sau lên Google Sheets:
D2=T(IFERROR(IF(COUNTIF($D$1:D1,D1)=VLOOKUP(D1,Sheet1!$E$5:$F$14,2,),INDEX(Sheet1!$E$5:$E$14,MATCH(D1,Sheet1!$E$5:$E$14,)+1),D1),Sheet1!$E5))
E2=IFERROR(VLOOKUP(D2,Sheet1!$E$5:$F$100,2,),"")Chỉ Enter, fill xuống.
(Xem thử file này trên Google Sheets...