ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Arrange columns (https://www.excelbanter.com/excel-programming/391219-arrange-columns.html)

[email protected]

Arrange columns
 
Hi all

I currently have a spreadsheet with several hundred rows and nine
columns, two of the columns are numnerical values and what I am
looking to achieve is to have a drop down box on my sheet which will
allow me to sort the data by the two numerical columns (highest value
will be the first entry). When I simply click on the header of each
column it does re-arrange the data however it does not rearrange the
entire row, simply the column,

If the above isn't clear then please do not hesitate to contact me.

TIA

Craig


Peter[_61_]

Arrange columns
 
On 13 Jun, 15:42, wrote:
Hi all

I currently have a spreadsheet with several hundred rows and nine
columns, two of the columns are numnerical values and what I am
looking to achieve is to have a drop down box on my sheet which will
allow me to sort the data by the two numerical columns (highest value
will be the first entry). When I simply click on the header of each
column it does re-arrange the data however it does not rearrange the
entire row, simply the column,

If the above isn't clear then please do not hesitate to contact me.

TIA

Craig


Try this:
Selection.Sort Key1:=Range("B1"), Order1:=xlDescending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
_
DataOption1:=xlSortNormal



All times are GMT +1. The time now is 11:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com