LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,344
Default Data auto sorting

Hi Freshman,

You need to use a macro:

Private Sub Worksheet_Change(ByVal Target As Range)
Set isect = Application.Intersect(Range("A1:A" &
Range("A65536").End(xlUp).Row), Target)
If Not isect Is Nothing Then
Range("A1").CurrentRegion.Sort Key1:=Range("A1"),
Order1:=xlAscending, Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
End If
End Sub

Put this code in the sheet module for the sheet your data is on. Press Alt
F11 to open the VBE. Double-click the sheet name under your workbook name on
the top left navigation pane.
--
Cheers,
Shane Devenshire


"Freshman" wrote:

Dear experts,

I've a table of data and the records are filled up by rows. The new records
are copied from other files and pasted to my table. Column A is for clients'
numbers. What I want is whenever new records are pasted to the table, then
all records will be sorted by clients' numbers in ascending order
auotmatically. Please advise how it can be done.

Thanks in advance.

 
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
Sorting Ranges of Data Kevin Dunn Excel Worksheet Functions 2 October 16th 06 09:06 PM
Sorting data to match existing data Jack C Excel Discussion (Misc queries) 4 May 24th 06 09:48 AM
From several workbooks onto one excel worksheet steve Excel Discussion (Misc queries) 6 December 1st 05 08:03 AM
How to AUTO SORT A-Z new data in a column (not menual sorting) Nir Excel Worksheet Functions 2 November 8th 05 10:29 PM
sorting data in linked worksheets Allyson Excel Discussion (Misc queries) 0 June 8th 05 11:25 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"