LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default automatically sort a table after changing a cell


Hi

Did you try something like this


Private Sub Worksheet_Change(ByVal Target As Range)
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
'you can change the column here change from d to whatever
Range("a1:" & "d" & rowcount).Select
'you can change the sort column here change from d to whatever
'you can change also if there is heater here form Header:=xlNo to
Header:=xlYes
Selection.Sort Key1:=Range("C1"), Order1:=xlAscending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
'Range("a1").Select

End Sub


--
jetted
------------------------------------------------------------------------
jetted's Profile: http://www.excelforum.com/member.php...o&userid=17532
View this thread: http://www.excelforum.com/showthread...hreadid=565159

 
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 changing cell information BBurz Excel Discussion (Misc queries) 3 July 12th 06 03:15 PM
Refresh Pivot Table Automatically anandmr65 Excel Discussion (Misc queries) 1 July 11th 06 01:04 PM
Formula automatically changing cell references Nina Excel Worksheet Functions 1 February 8th 06 09:55 PM
Using single cell reference as table array argument in Vlookup CornNiblet Excel Worksheet Functions 3 September 22nd 05 09:15 AM
how do i automatically sort data in a pivot table Esche Excel Worksheet Functions 1 June 11th 05 12:43 PM


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