问题
I want to give same number to the duplicate data in excel
A B
apple 1
apple 1
apple 1
ball 2
bat 3
dog 4
dog 4
goat 5
回答1:
Sort your column A then insert the number 1 in cell B2 and the following function in cell B3 and copy down.
in cell B2=1
function in cell B3: =if(A3=A2, B2, B2+1)
Update
来源:https://stackoverflow.com/questions/29914063/i-want-to-give-same-number-to-the-duplicate-data-in-excel