# Ranking the numbers in order of appearances.

1. ## Ranking the numbers in order of appearances.

Hi,
Can somebody please help me. I have a set a numbers in one column say A like this.

6
6
4
4
4
3
3
2
1

All i want is to write a forrmula in each adjacent cell in column B giving me the ranking of these numbers in column A. eg., above here number 6 is appearing twice so I would want it 1 and 2. Number 4 as it appears thrice so it would be 1,2 and 3 and so on. The result would look like this.

6 1
6 2
4 1
4 2
4 3
3 1
3 2
2 1
1 1

Countif function only gives me the number of times it appears in a range. It does not give me the order of the appearance in the range. Any help will be appreciated. Thanks in advance.

P.S. The numbers change dynamically based on some results. So the ranking has to be automatic.
The numbers may or may not be in descending or ascending order. They can be random too.

Thanks
Maneesh

2. ## Re: Ranking the numbers in order of appearances.

Hi,

When you use countif function do not select full row select only total data.
check the attached file.

3. ## Re: Ranking the numbers in order of appearances.

Hi, countif should solve your problem

=COUNTIF(\$A\$2:A2;A2)
Same service from:

=SUMPRODUCT((\$A\$2:\$A\$1000=\$A2)*(\$A2<\$A\$2:\$A\$1000))+SUMPRODUCT((A\$2:\$A2=\$A2)*(A\$2:\$A2=\$A2))
Regards

नमस्ते

4. ## Re: Ranking the numbers in order of appearances.

Your post does not comply with Rule 8 of our Forum RULES.

Cross-posting is when you post the same question in other forums on the web.

You'll find people are disinclined to respond to cross-posts because they may be wasting their time solving a problem that has been solved elsewhere.

We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser)to the cross-post.

5. ## Re: Ranking the numbers in order of appearances.

Thanks a lot Rahul & Canapone. This was exactly what I wanted.

@DonkeyOte: This was the first time I posted something in a forum and so was not aware of that. Will see to it next time.

Thanks All
Maneesh

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1