Hi Manan,
You can try =ARRAYFORMULA(IF(A2:A<>"",COUNTIFS(A2:A,A2:A,ROW(A2:A),"<="&ROW(A2:A)),""))
Explanation:
- A2:A<>"" : To only number the rows that have data in A
- COUNTIFS: Only consider rows that have the same project name (A2:A, A2:A) and apply a dynamic range containing only from the start of the column to that specific row (ROW(A2:A), <=&ROW(A2:A)
Please try and get back to me if you need more help.