excel colum in alphbetical order

  • Thread starter Thread starter Guest
  • Start date Start date
You cannot format a column to sort.

You have to use event code in the sheet module.

Right-click on your sheet tab and "View Code"

Copy/paste this code into that module.

Private Sub Worksheet_Change(ByVal Target As Range)
Columns(1).Sort Key1:=Range("A1"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
End Sub

As you enter data in column A it will sort.


Gord Dibben MS Excel MVP



On Tue, 1 Aug 2006 13:29:02 -0700, Excel questions <Excel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top