unknownymous
Board Regular
- Joined
- Sep 19, 2017
- Messages
- 249
- Office Version
- 2016
- Platform
- Windows
Hi Guys,
How do you create a reference number for sorting purpose in VBA form?
Example:
On Sheet 1, I will be adding new column in A where will generate a number 1,2,3,4,5,6...etc. up to the last non cell blank cell now in Column B (address details). I will be using it for sorting purposes.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Brooklyn[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]District 1[/TD]
[TD]3,200[/TD]
[TD]N/A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]United States[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]District 2[/TD]
[TD]5,000[/TD]
[TD]N/A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]New York[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]District 3[/TD]
[TD]2,500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]United States[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]United States[/TD]
[TD]District 5[/TD]
[TD]5,000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thank you!
How do you create a reference number for sorting purpose in VBA form?
Example:
On Sheet 1, I will be adding new column in A where will generate a number 1,2,3,4,5,6...etc. up to the last non cell blank cell now in Column B (address details). I will be using it for sorting purposes.
[TABLE="width: 500"]
<tbody>[TR]
[TD]Brooklyn[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]District 1[/TD]
[TD]3,200[/TD]
[TD]N/A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]United States[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]District 2[/TD]
[TD]5,000[/TD]
[TD]N/A[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]New York[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]District 3[/TD]
[TD]2,500[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]United States[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]United States[/TD]
[TD]District 5[/TD]
[TD]5,000[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Thank you!