Creating an order

Welsh Mark3

Board Regular
Joined
Apr 7, 2014
Messages
76
I'm looking to create a formula that 'rank' an occurrence in the file, I guess similar to the count function but rather than the number of times it appears, I want where it appears in that range of occurrences.

Column ADesired Result
Belgium

<tbody>
</tbody>
1
Belgium

<tbody>
</tbody>
2
France

<tbody>
</tbody>
1
France

<tbody>
</tbody>
2
France

<tbody>
</tbody>
3
Italy

<tbody>
</tbody>
1
Netherlands

<tbody>
</tbody>
1

<tbody>
</tbody>
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
31,977
Office Version
365
Platform
Windows
How about

<b>Excel 2013 32 bit</b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255, 255, 255);border: 1px solid;border-collapse: collapse; border-color: rgb(182, 170, 166)"><colgroup><col width="25px" style="background-color: rgb(240, 224, 224)" /><col /><col /></colgroup><thead><tr style=" background-color: rgb(240, 224, 224);text-align: center;color: rgb(32, 17, 22)"><th></th><th>A</th><th>B</th></tr></thead><tbody><tr ><td style="color: rgb(32, 17, 22);text-align: center;">1</td><td style=";">Column A</td><td style=";">Desired Result</td></tr><tr ><td style="color: rgb(32, 17, 22);text-align: center;">2</td><td style=";">Belgium</td><td style="text-align: right;;">1</td></tr><tr ><td style="color: rgb(32, 17, 22);text-align: center;">3</td><td style=";">Belgium</td><td style="text-align: right;;">2</td></tr><tr ><td style="color: rgb(32, 17, 22);text-align: center;">4</td><td style=";">France</td><td style="text-align: right;;">1</td></tr><tr ><td style="color: rgb(32, 17, 22);text-align: center;">5</td><td style=";">France</td><td style="text-align: right;;">2</td></tr><tr ><td style="color: rgb(32, 17, 22);text-align: center;">6</td><td style=";">France</td><td style="text-align: right;;">3</td></tr><tr ><td style="color: rgb(32, 17, 22);text-align: center;">7</td><td style=";">Italy</td><td style="text-align: right;;">1</td></tr><tr ><td style="color: rgb(32, 17, 22);text-align: center;">8</td><td style=";">Netherlands</td><td style="text-align: right;;">1</td></tr></tbody></table><p style="width:3.6em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(182, 170, 166);border-top:none;text-align: center;background-color: rgb(240, 224, 224);color: rgb(32, 17, 22)">Sheet2</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255, 255, 255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255, 255, 255);border-collapse: collapse; border-color: rgb(182, 170, 166)"><thead><tr style=" background-color: rgb(240, 224, 224);color: rgb(32, 17, 22)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(240, 224, 224);color: rgb(32, 17, 22)">B2</th><td style="text-align:left">=COUNTIF(<font color="rgb(255">A$2:A2,A2</font>)</td></tr></tbody></table></td></tr></table><br />
 

Forum statistics

Threads
1,081,524
Messages
5,359,269
Members
400,523
Latest member
ExcelNewbie98

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top