General discussion

Locked

Sorting items in Excel 2000

By Blackcurrant ·
Hi

I would like to know if it is possible to permanently sort a column in Excel 2000.

For example, I have a list of names which I can sort alphabetically. What I would like to happen is if someone added a name to the end of the list, Excel could automatically sort it so the new name would appear in the correct alphabetical position.

Can anyone help with this please?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by DKlippert In reply to Sorting items in Excel 20 ...

Here's a quick solution.
Write a macro

Sub DoSort()
Columns("A:A").Select
Selection.Sort Key1:=Range("A1"), _ Order1:xlAscending, Header:=xlGuess
Range("A1").Select
End Sub

Right click the sheet tab and choose View Code.
Change the selection at the top from (General to Worksheet. On the right choose Change.

The code should read:

Private Sub Worksheet_Change(ByVal Target As Range)
DoSort
End Sub

Collapse -

by DKlippert In reply to

Selection.Sort Key1:=Range("A1"), Order1:xlAscending, Header:=xlGuess

This can be one line

Collapse -

by Blackcurrant In reply to

Mant thanks

Collapse -

by Blackcurrant In reply to Sorting items in Excel 20 ...

This question was closed by the author

Back to Software Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums