Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default 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.

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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatic sorting (giving max and min) based on custom sorting lis Joe Lewis[_2_] Excel Worksheet Functions 4 November 23rd 08 05:12 AM
automatic sorting bkunes Excel Worksheet Functions 4 February 20th 08 12:59 AM
automatic sorting in excel Gostal New Users to Excel 2 December 26th 06 08:35 PM
Automatic sorting in excel Gostal Excel Discussion (Misc queries) 2 December 21st 06 06:54 PM
Automatic sorting in Excel? john Excel Discussion (Misc queries) 3 December 21st 06 09:54 AM


All times are GMT +1. The time now is 09:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"