LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default selecting and sorting a variable rowlength

Hi,

I've got a sheet where I want to select and then sort, via a macro, a
colum of data.
It always starts at "A11", but the end is always different.
How do I select this and then sort it this way that the data behind it
(in colum "B11:E11" till the end) will follow.

I have this code, but for some reasson only the selected colum will
sort, the data in the collums behind it will not follow.

Range("A11").Select
Range(Selection, Selection.End(xlDown)).Sort Key1:=Range("A11"),
Order1:=xlAscending, Header:= _
xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal

Can somebody please help me out?
Either by changing this code, or a total different solution.

Regards,
Maus

 
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
Selecting a variable range Bill Excel Programming 4 August 16th 06 05:42 PM
selecting Variable range katmando[_10_] Excel Programming 4 May 18th 06 09:51 AM
selecting rows using a variable. cherrynich Excel Programming 2 May 2nd 06 08:27 PM
Selecting a row with a variable ? Blewyn[_6_] Excel Programming 3 April 20th 04 08:16 AM
Selecting a Range Using a Variable Bob J. Excel Programming 4 September 14th 03 09:24 PM


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