please see below image to understand what i want to do.
John has serial# 1001, when john is repeated on client column, serial# is same as it was on first entry. How can i automate this process in excel?
Put 1001
in A2. Then in A3 put:
=IF(B3<>"",IFERROR(INDEX($A$1:A2,MATCH(B3,$B$1:B2,0)),MAX($A$1:A2)+1),"")
And copy it down the column.