I want to give same number to the duplicate data in excel

亡梦爱人 提交于 2019-12-25 02:49:10

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!