View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.newusers
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How can I sort data automatically?

One play, adapted from a past posting by Andy Brown

Right-click on the sheet tab choose "View Code"
Then copy n paste this into the code window (white space)
'------
Private Sub Worksheet_Change(ByVal Target As Range)
Range("A:A").Sort Key1:=Range("A1"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
End Sub
'--------
Press Alt+Q to get back to Excel.
Test it out by typing numbers in A1 down
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"surekha" wrote:
I want data to be sorted automatically while typing on the screen?

for example I want number to come serialy if i type 4 it will get
automatically shifted in between 3 and 5 which is already type in the screen.