LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Problem sorting data

The code was sorting a range on a different worksheet--not the sheet that got
changed.


ssGuru wrote:
<<snipped

Not sure if you need an automatic sort but this code automatically
sorts column 13 or col 16 exclusively whenever any new value is added
to the columns
These columns DO NOT have a header. It only sorts a single column at
a time and doesn't sort many columns by any single column.

'070625-DD Sort some list columns automatically in add value
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 13 Or Target.Column = 16 Then
Columns(Target.Column).Sort _
Key1:=Cells(1, Target.Column), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, _
MatchCase:=False, Orientation:=xlTopToBottom
'Target.CurrentRegion.Name = "NameList"
End If
End Sub


--

Dave Peterson
 
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
Data Sorting Problem Dado Excel Discussion (Misc queries) 2 August 29th 09 10:10 PM
problem sorting data clcnewtoaccess Excel Discussion (Misc queries) 5 February 9th 09 08:00 PM
Problem with Sorting Data reggiebu Excel Discussion (Misc queries) 2 June 9th 05 09:37 PM
data sorting problem Pong Excel Worksheet Functions 0 February 18th 05 05:45 PM
data sorting problem Pong Excel Worksheet Functions 0 February 18th 05 05:39 PM


All times are GMT +1. The time now is 03:05 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"