ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Automatic sorting in Excel? (https://www.excelbanter.com/excel-discussion-misc-queries/123353-automatic-sorting-excel.html)

john

Automatic sorting in Excel?
 
I would like to be able to have a column sorted alphabetically contiuously.
In other words, whenever data is entered, the whole column gets arranged
alphabetically without having to "click' on the sort function.

Thanks.

----- Posted with Newsbin Pro 5.0 ------
--- www.newsbin.com ---



John Bundy

Automatic sorting in Excel?
 
You can start with this, adapt as needed:

Private Sub Worksheet_Change(ByVal Target As Range)


Columns("B:B").Select
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending

End Sub

"john" <john@doe wrote in message
...
I would like to be able to have a column sorted alphabetically contiuously.
In other words, whenever data is entered, the whole column gets arranged
alphabetically without having to "click' on the sort function.

Thanks.

----- Posted with Newsbin Pro 5.0 ------
--- www.newsbin.com ---





Gostal

Automatic sorting in Excel?
 
Thanks for your promtp reply,

unfortunately, eventhough I feel fairly comfortable with many excel
functions, I am not a power user of excel and need a little bit more
guidance...

thanks.

"John Bundy" wrote in message
...
You can start with this, adapt as needed:

Private Sub Worksheet_Change(ByVal Target As Range)


Columns("B:B").Select
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending

End Sub

"john" <john@doe wrote in message
...
I would like to be able to have a column sorted alphabetically
contiuously.
In other words, whenever data is entered, the whole column gets arranged
alphabetically without having to "click' on the sort function.

Thanks.

----- Posted with Newsbin Pro 5.0 ------
--- www.newsbin.com ---







JMay

Automatic sorting in Excel?
 
Gosral -- John is recommending you post his code into
The specific Sheet module that houses your data;
If sheet1, then within the code module of sheet1
HTH

"Gostal" wrote in message
:

Thanks for your promtp reply,

unfortunately, eventhough I feel fairly comfortable with many excel
functions, I am not a power user of excel and need a little bit more
guidance...

thanks.

"John Bundy" wrote in message
...
You can start with this, adapt as needed:

Private Sub Worksheet_Change(ByVal Target As Range)


Columns("B:B").Select
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending

End Sub

"john" <john@doe wrote in message
...
I would like to be able to have a column sorted alphabetically
contiuously.
In other words, whenever data is entered, the whole column gets arranged
alphabetically without having to "click' on the sort function.

Thanks.

----- Posted with Newsbin Pro 5.0 ------
--- www.newsbin.com ---







All times are GMT +1. The time now is 03:06 PM.

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