Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I wish to auto sort text and numbers in two columns and on 5 rows
descending. Is it possible to do this using Visual Basic? Thanks, Rube |
#2
![]() |
|||
|
|||
![]()
Columns would be s & t. Rows 18-22
Rube |
#3
![]() |
|||
|
|||
![]()
Hello,
This was paired down from a macro recording: With ActiveSheet.Range("S18:T22") .Sort Key1:=Range("S18"), Order1:=xlAscending, Header:=xlGuess End With If you wanted to sort by column T, change that in the second line of the code. Hope it helps, -- Ken Puls www.officearticles.com "Rubix" wrote in message ... Columns would be s & t. Rows 18-22 Rube |
#4
![]() |
|||
|
|||
![]()
Thanks so much for your response.
I'm not sure if I am doing this right but in VBAProject under ThisWorkbook I have: Private Sub Workbook_Open() With ActiveSheet.Range("S18:T22") .Sort Key1:=Range("T18"), Order1:=xlDescending, Header:=xlGuess End With End Sub This sorts column T but only when the spread sheet opens. I wish for auto sorting while data is added. Sorry I'm a newbie at this sort of thing. Rube On Sat, 12 Nov 2005 20:52:42 -0800, "Ken Puls" wrote: Hello, This was paired down from a macro recording: With ActiveSheet.Range("S18:T22") .Sort Key1:=Range("S18"), Order1:=xlAscending, Header:=xlGuess End With If you wanted to sort by column T, change that in the second line of the code. Hope it helps, |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Auto insert page breaks in Excel, based on a sort of numbers | Excel Discussion (Misc queries) | |||
How to AUTO SORT A-Z new data in a column (not menual sorting) | Excel Worksheet Functions | |||
Auto sort a linked sheet | Excel Worksheet Functions | |||
Help:macro to auto sort data to different worksheets... | Excel Discussion (Misc queries) | |||
Leading zeros | Excel Discussion (Misc queries) |