Sort your column A then insert the number 1 in cell B2 and the following function in cell B3 and copy down.
function in cell B3 : =if(A3=A2, B2, B2+1)
Update
answered Apr 28, 2015 at 8:29 dimitris_ps dimitris_ps 5,921 3 3 gold badges 32 32 silver badges 56 56 bronze badges Not Working please try in excel – user4542333 Commented Apr 28, 2015 at 8:37It is also possible to do it in a dynamic way that does not require sorting.
Paste the following formula in B2 and copy down the column:
=IFERROR(INDEX(B$1:B1,MATCH(A2,A$1:A1,0)),MAX(B$1:B1)+1)
answered Nov 9, 2021 at 13:49
1 1 1 bronze badge
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
Site design / logo © 2024 Stack Exchange Inc; user contributions licensed under CC BY-SA . rev 2024.9.4.14806