Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 1
Default How can I sort data automatically?

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.
  #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.

  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 903
Default How can I sort data automatically?

You won't be able to continue typing into the next
column if the row jumps, would suggest you do
the sort when the worksheet is activated

Sorting triggered by an Event Macro
http://www.mvps.org/dmcritchie/excel....htm#activatge

which includes an event macro for worksheet activation and
another event macro to activate at will with a doubleclick.

also see additional comments in
http://www.mvps.org/dmcritchie/excel...tm#ws_activate

---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Max" wrote ...
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)



  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 903
Default How can I sort data automatically?

correction for typo (#activate fragment-id was mistyped)
http://www.mvps.org/dmcritchie/excel...g.htm#activate


  #5   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 3,572
Default How can I sort data automatically?

One approach is to use a formula in a "helper" column.

The helper column will sort itself, automatically, as numbers are entered
into the "main" column.

With numbers being entered in Column A,
Enter this formula in B1:

=IF(A1,SMALL(A:A,ROWS($1:1)),"")

And copy down as needed.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===

"surekha" wrote in message
...
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.


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
Automatically duplicate and sort data into seperate w.sheet Ting Excel Discussion (Misc queries) 1 June 21st 06 02:14 AM
How can I sort a group of numbers automatically as data is entere Adrew Excel Worksheet Functions 4 December 19th 05 12:56 AM
Can an Excel Spreadsheet automatically sort new data? Stumped Excel Worksheet Functions 2 November 8th 05 04:26 PM
how do i automatically sort data in a pivot table Esche Excel Worksheet Functions 1 June 11th 05 12:43 PM
sort automatically Mike Lemke Excel Worksheet Functions 2 October 31st 04 08:18 PM


All times are GMT +1. The time now is 06:05 PM.

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"