LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Danny
 
Posts: n/a
Default VBA, excel - find, resize and sort

Hi,

Last week, I posted a similar question and got and answer (thank you) to
resize a range. I got the following macro:

Sub Sort()

Clients '(name of macro to find this range)

With ActiveCell
ilastrow = Cells(Rows.Count, .Column).End(xlUp).Row
Set rng = .Resize(ilastrow - .Row + 1, 9)

Selection.Sort Key1:=Range("B15"), Order1:=xlAscending, Header:=xlYes, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom

End With

End Sub

The first part of the macro would highlight the range to be sorted and it
works perfectly. However, the second part of the macro doesn't work if I try
to find ANOTHER RANGE to sort. Maybe it's because the range "B15" doesn't
match the cell of the "NEW Range"

Please help and 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
Thumbnail pictures in cells don't sort with rest of row Don Excel Discussion (Misc queries) 3 February 26th 05 01:11 PM


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