If your data is in A, then in B: =A2&"-"&COUNTIF(A$1:A1,A1)+1