ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How to sort on the row selected by user? (https://www.excelbanter.com/excel-programming/340742-how-sort-row-selected-user.html)

-JEFF-[_2_]

How to sort on the row selected by user?
 
1. I have code that store the column selected by the user,
2. I know how to select the cells I want sorted
3. I need the entire selection sorted not just one column

this is my code for the selection which works fine:
x = Range("A" & Rows.Count).End(xlUp).Row
Range("A11", "AA" & x).Select

If the user selected column "B" to sort on, what would be the code to
execute the sort?
-JEFF-


All times are GMT +1. The time now is 03:05 AM.

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