View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
ibeetb ibeetb is offline
external usenet poster
 
Posts: 67
Default select a different range each time

or you could....
Have your macro select the first cell of each range, one at a time and after
each swelection, run the following:
Ex: Range("E5").select
Do While Not IsEmpty(ActiveCell)
ActiveCell.Offset(1, 0).Select
Loop

The row of cells under E5, like e6,e7,e8 would be selected one a t a time
and then some action performed......

after this, have the macro select the first cell of the NEXT range.....and
follow the same code


"Tom Ogilvy" wrote in message
...
Turn on the macro recorder (tools=Macro=Record a new macro)
Select the upper left corner of one of the ranges,
Then do Data=sort

the turn off the macro recorder

Adapt the macro to do any additional processing you require.

Regards,
Tom Ogilvy


Joy Chen wrote in message
...
I have segments of data in my spreadsheet that contain similar
information and require to be organized in the similar fashion. It
would be nice if I can write a macro so that each time I can sort a
fixed size of range starting at the beginning of each segment. Thank
you.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!