Create a sequence column in Excel

此生再无相见时 提交于 2020-01-24 13:11:35

问题


I have a column with names and i wanted to add a column that count the sequence of each row based on the name. So if a name appears multiple time (i.e 4), the first row of that name will have sequence 1 and the 2nd row sequence 2, etc...

Name        Sequence    
Andrew       1    
Andrew       2    
Andrew       3    
Paul         1    
Amy          1    
Amy          2    
Jean         1

回答1:


Use COUNTIF with a variable range:

=COUNTIF($A$1:A2,A2)



来源:https://stackoverflow.com/questions/52171832/create-a-sequence-column-in-excel

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