Give numbers to column starting from minimum to maximum (0 to....)

Kishan

Well-known Member
Joined
Mar 15, 2011
Messages
1,648
Office Version
  1. 2010
Platform
  1. Windows
Hi,</SPAN></SPAN>

In the data column C I have got random numbers from 0 to 2211 </SPAN></SPAN>

I need to replace the random numbers of column C and want to give them number 0 to as long as data find in ascending order. Note: the duplicate numbers will be assignee the same number</SPAN></SPAN>

For example... </SPAN></SPAN>
Minimum number start in cell C63=0 so D63 will be replaced with 0</SPAN></SPAN>
Next number is 3 in cell C65 so D64 will be replaced with 1</SPAN></SPAN>
Next number is 7 in cell C10 so D10 will be replaced with 2</SPAN></SPAN>
Next number is 22 in cell C19 so D19 will be replaced with 3 so this way assigned all number 0 to 2211 with 0 to 79 in ascending order.</SPAN></SPAN>

Sample data...</SPAN></SPAN>


Book1
ABCD
1
2
3
4
5Real numbersResult New Numbers
6221179
7221179
8221179
9221179
1072
11195160
12221179
13221179
14201871
1576925
16200769
17211374
18166536
19223
20214376
21169839
2229011
23194959
24181848
2579828
26208572
27187455
2880731
29184451
30908
31211173
32176343
33197862
34169638
351209
3675021
37198563
38211775
39193258
40183449
41200668
42198664
43177044
44183750
4572816
46201770
47167537
48199866
4935012
50191257
5176424
5292032
53174341
5492032
55165734
5646013
57186954
58165633
59284
60184753
6122510
62195961
6300
6473518
6531
66199065
6775522
68178545
6972514
70178946
7178826
72295
73166435
74166435
75175342
7672715
77200067
7879929
79220078
8074920
81181147
8280230
83306
84219577
8579727
8676323
8773017
8874319
89184552
90188756
91327
92172740
93211173
Sheet1


Thank you in advance</SPAN></SPAN>

Using Excel 2000</SPAN></SPAN>

Regards,</SPAN></SPAN>
Kishan</SPAN></SPAN>
 
Last edited:

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Try

Array formula in D6 copied down
=SUM(IF(FREQUENCY(C$6:C$93,C$6:C$93),IF(C$6:C$93 < C6,1)))<c6,1)))

Ctrl+Shift+Enter

M.</c6,1)))
 
Last edited:
Upvote 0
Try

Array formula in D6 copied down
=SUM(IF(FREQUENCY(C$6:C$93,C$6:C$93),IF(C$6:C$93 < C6,1)))<C6,1)))

Ctrl+Shift+Enter

M.</C6,1)))[ QUOTE]
Wow! Marcelo Branco, I liked the formula it is superb working as required </SPAN></SPAN>

Thank you so much for your kind help

Have a nice weekend
</SPAN></SPAN>

Kind Regards,
</SPAN>
Kishan
:)</SPAN></SPAN>
 
Upvote 0
Hi,</SPAN>

The given example in the post#1 is with 93 rows and the formula provided in the post#3 works perfect with approximately very well with data rows 2500 but when today I wanted to use it for 58000 rows it just hang my computer twice a thrice may it is of my version and poor computer
</SPAN></SPAN>

Would it be any VBA solution for this problem?
</SPAN></SPAN>

Please help
</SPAN></SPAN>

Thank you in advance
</SPAN></SPAN>

Using Excel 2000
</SPAN></SPAN>

Regards,
</SPAN></SPAN>
Kishan
</SPAN>
 
Upvote 0

Forum statistics

Threads
1,214,561
Messages
6,120,239
Members
448,951
Latest member
jennlynn

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top