Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
112 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 Answer

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...