Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
116 views
in Technique[技术] by (71.8m points)

Ranking Duplicate String Values in Excel

I have a spreadsheet with string values and need to create a column with the rank (without using the rank function) of the duplicate values from another column. Please see below for example of the desired outcome where Dupe_Rank is the created column.

Thanks!

Name Dupe_Rank
John 1
John 2
Dave 1
John 3
Bill 1
Dave 2
question from:https://stackoverflow.com/questions/65644093/ranking-duplicate-string-values-in-excel

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

let's say "Name" starts from column 'A' and row 2 as in below figure:

enter image description here

then add this formula:

=COUNTIF(A$2:A2,A2)

to cells below Dupe_Rank and then drag(or copy-paste) this formula to all the cells

enter image description here


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...