I am looking for a formula which can write the sequence no based on the criteria of Salesperson name and Sale order Date. below is the sample table. Please check if anyone can help me.
I tried using countif
=COUNTIFS(C$2:C2,"<="&C2,A$2:A2,A2)
but not getting the expected results as given in the image


This formula gives this result
=MATCH(B2,SORT(TOCOL(IF(A$2:A$8=A2,B$2:B$8,1/0),3),1,1),0)