Button to Automatically Sort Column Values from Largest to Smallest

bamaguy

New Member
Joined
May 25, 2017
Messages
28
Hi I am looking for a way to have a button to be able to click once I have all of my data entered to sort all values from largest to smallest. I know it has to do with macros and assigning it to a button but could someone assist?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Try this

Code:
Sub Sort_All()
    ActiveSheet.UsedRange.Sort key1:=Range("A1"), order1:=xlDescending, Header:=xlYes
End Sub
 
Upvote 0
Couldnt get this to work.

It would help a little if you share more information about your sheet. For example: the name of the sheet, in which row your headings are, in which row your data begins.
In which column your data begins, in which column they end.
If you have merged cells, which cells.
If the sheet is protected.
By which column or which columns do you want the order.

If the macro sends an error, what exactly does the macro say.


If you provide that detail of information, it will be easier for you to receive help.
 
Upvote 0

Forum statistics

Threads
1,214,908
Messages
6,122,187
Members
449,071
Latest member
cdnMech

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