VBA Speed Sort ?

Pinaceous

Well-known Member
Joined
Jun 11, 2014
Messages
1,113
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I could of course record a macro but I have the need for speed.

How can I speed up my sorting job via written code versus a scripted code?

I'm using Excel 2013 & I want to quicken my sort criteria:
-expanded selection Columns C:2 to Column V:573
-not in deleting duplicates
-by Column G from smallest to highest

Many thanks in advance.

R/
Pin

:confused:
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Hi All,

I could of course record a macro but I have the need for speed.

How can I speed up my sorting job via written code versus a scripted code?

I'm using Excel 2013 & I want to quicken my sort criteria:
-expanded selection Columns C:2 to Column V:573
-not in deleting duplicates
-by Column G from smallest to highest

Many thanks in advance.

R/
Pin

:confused:

It should not be that slow tho, should it? That is usually not the part im worried about going to "slow".

Do you however need the range C2:V573 beeing dynamic? or will it always be this selection?
 
Upvote 0
Hi Sturla,

It will always be this selection. I just would like to see if there was a written VBA to accomplish this task.

Can you provide a code for this?

Thanks,
Pin
 
Upvote 0
Code:
Range("C2:V753").Sort Key1:=Range("G2")
 
Upvote 0
Wow shg,

I'm going to try this out ASAP! Thanks, I'm under the assumption that this will sort from 'smallest to largest'.

Many Thanks,
Pin
 
Upvote 0
Hey 'shg',

I know its been awhile, but do you also know how to also sort by 'A' to 'Z'?

If 'Range("C2:V753").Sort Key1:=Range("G2")' sorts by 'smallest' to 'largest'?

Many thanks,

Pin
 
Upvote 0

Forum statistics

Threads
1,214,798
Messages
6,121,635
Members
449,043
Latest member
farhansadik

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