PC Review


Reply
Thread Tools Rate Thread

Automatic sorting in excel

 
 
Gostal
Guest
Posts: n/a
 
      21st Dec 2006
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.

I am not a power user of excel, but I now understand the basics of running a
macro. I have been guided to use the following macro example and adapt it to
my worksheet. I have tried a few changes, but I cannot get it to work. Lets
say the filename is "mybook" and the worksheet name is "sheet1" and the
range I want to sort automatically is B1:B20

Private Sub Worksheet_Change(ByVal Target As Range)


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

End Sub

However, I am not sure exactly which part I need to change in this code, for
it to work on my worksheet.


Thanks.


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic sorting in Excel Anand Dhuru Microsoft Excel Discussion 1 19th Oct 2007 12:52 PM
automatic sorting in excel Gostal Microsoft Excel New Users 1 26th Dec 2006 08:35 PM
Automatic sorting in Excel? john Microsoft Excel Misc 3 21st Dec 2006 09:54 AM
Automatic sorting in excel Gostal Microsoft Excel Discussion 0 21st Dec 2006 01:23 AM
Automatic sorting in excel Gostal Microsoft Excel Misc 0 21st Dec 2006 01:23 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:13 PM.