Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Is there a way to have a excel automatically alphabetize a sheet?

My boss would like to create a spreadsheet that will automatically
alphabetize itself. Is this possible? He wants to be able to insert data
and instead of sorting it himself, if the program would do it. Please let me
know if there is a way!
Thank you!

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Is there a way to have a excel automatically alphabetize a sheet?

Here is an example. Enter this small macro into your worksheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Columns("A:A")) Is Nothing Then
Else
Application.EnableEvents = False
Columns("A:A").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Application.EnableEvents = True
End If
End Sub

When data is entered in column A, the column will automatically re-sort
itself. You can modify the code to sort more than one column.

REMEMBER: Worksheet code.
--
Gary's Student


"Mzinsser" wrote:

My boss would like to create a spreadsheet that will automatically
alphabetize itself. Is this possible? He wants to be able to insert data
and instead of sorting it himself, if the program would do it. Please let me
know if there is a way!
Thank you!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Is there a way to have a excel automatically alphabetize a sheet?

I don't like things too automatic. If I make a mistake and the data sorts, it
might be difficult to find/correct the error.

If you're running xl2003, you could apply data|filter|autofilter to the range
and use the dropdown to sort by one of those fields.

I like this technique from Debra Dalgleish's site:
http://contextures.com/xlSort02.html

It puts rectangles over the headers and then you can click on that rectangle to
sort your data by that column.

Mzinsser wrote:

My boss would like to create a spreadsheet that will automatically
alphabetize itself. Is this possible? He wants to be able to insert data
and instead of sorting it himself, if the program would do it. Please let me
know if there is a way!
Thank you!


--

Dave Peterson
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
Sum up columns in different sheet with error check zeyneddine Excel Discussion (Misc queries) 13 July 10th 06 01:21 PM
Combining data from cells from several excel sheets to a new sheet Rik Excel Discussion (Misc queries) 4 February 22nd 06 10:16 AM
How do i update hyperlink in excel spread sheet automatically. Phanichand Mudumba Excel Discussion (Misc queries) 1 September 13th 05 05:46 PM
In Excel, how do you make one whole sheet equal to another. ryan Excel Discussion (Misc queries) 2 August 31st 05 07:03 PM
in excel, how do i set up a spread sheet that automatically total. jgus New Users to Excel 1 January 14th 05 05:10 AM


All times are GMT +1. The time now is 12:58 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"