LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
Pat Pat is offline
external usenet poster
 
Posts: 210
Default Alphabetize when data changes



"Simon Lloyd" wrote:


Try this, it re-alphabetises from cell A1 when a new entry is added,
paste this code directly on to the code sheet for sheet you want this
to happen on.

Regards
Simon

Private Sub Worksheet_Change(ByVal Target As Range)
If ActiveCell.Column = 2 Then 'This tells the sub not to work if the
column is number 2 or more
Exit Sub
ElseIf ActiveCell.Column = 1 Then 'This tells the sub to only work if
column 1
Columns("A:A").Select 'This is your column range and the A1 below is
telling the sort where to start
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom,
_
DataOption1:=xlSortNormal

End If
End Sub


--
Simon Lloyd
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.excelforum.com/member.php...fo&userid=6708
View this thread: http://www.excelforum.com/showthread...hreadid=499263


 
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
Need to alphabetize data from separate cells within same row marketingchickie Excel Worksheet Functions 2 November 30th 09 09:55 PM
is there a program i can use to automaticaly alphabetize data rbailey0884 Excel Discussion (Misc queries) 0 June 24th 09 05:21 PM
alphabetize Ahsen New Users to Excel 1 February 1st 07 04:13 AM
alphabetize EC Excel Discussion (Misc queries) 4 December 13th 06 12:36 AM
How do I alphabetize data in the field list? jmw Excel Discussion (Misc queries) 1 July 13th 06 10:43 PM


All times are GMT +1. The time now is 02:49 AM.

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

About Us

"It's about Microsoft Excel"