LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jac Jac is offline
external usenet poster
 
Posts: 58
Default How to generalize sorting range in macro???

Hi,

I have recorded a macro which would help me to sort a list of data. First,
when I have done with the recording, I found out that the range of the data
list is being hard coded in the marco, for example, Range("A1:F30").Sort
.......

But what happen is I may have different ranges of lists! Sometimes, the list
may be shorten then the previous one but sometimes may be longer then. So, I
tried to replace the fixed range with a Range Object variable; but it doesn't
work and the system generated a debug!!!

How actually to solve this problem????
Please advise........

Thanking 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
sorting range peyman Excel Discussion (Misc queries) 5 October 27th 07 10:29 PM
Sorting by range planetdust New Users to Excel 3 October 21st 07 01:03 AM
Sorting a Range cmm Excel Discussion (Misc queries) 1 June 30th 06 01:35 PM
sorting a range hawk[_2_] Excel Programming 1 January 1st 06 04:54 PM
Sorting multiple range using a macro onlinepredator Excel Programming 4 August 14th 04 12:52 PM


All times are GMT +1. The time now is 08:43 AM.

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"