Data sort by VBA

Panoos64

Well-known Member
Joined
Mar 1, 2014
Messages
882
Hi to all of you, kindly require to provide me support so that a VBA code, should sort in an "ActiveSheet" its data used, which start from "A12" till column "K" and "rows down". Therefore that the rows arises to 800000+ and should be sort by col. "F". Thank you all in advance
 
Last edited:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Is row 12 a header row that needs to stay put?
Also what column can be used to find the last row?
 
Upvote 0
Hi Fluff, row 12 is not header and should include in sort and column which should valid to find the last row should be "K". Thank you once again for your interesting to resolve my issue!
 
Upvote 0
Ok, how about
Code:
Sub Panoose()
    Range("A12", Range("K" & Rows.Count).End(xlUp)).Sort key1:=Range("F12"), order1:=xlAscending, Header:=xlNo
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,411
Messages
6,119,346
Members
448,888
Latest member
Arle8907

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