LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
sugargenius
 
Posts: n/a
Default best way to get reference to all used cells

I was using the macro recorder to see how to use the range.sort
function. When I did, I got something like:

Range("A1:J235").Sort Key1:=Range("A1"), Order1:=xlAscending

I should always know the number of columns but the number of rows will
vary. What's the best in code of coming up the "A1:J235"?

Thanks,
Woody

 
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
changing multiple cells from relative to absolute reference Mike Excel Discussion (Misc queries) 4 March 10th 05 02:11 PM
My formula screws up other reference cells... Jambruins Excel Discussion (Misc queries) 2 February 28th 05 02:57 PM
how do i reference cells to create a chart? Nick M Charts and Charting in Excel 1 December 15th 04 03:50 AM
3 cells are named - how to refere to them in one reference field in a chart Marie J-son Charts and Charting in Excel 2 December 2nd 04 04:52 PM
copy group of cells to another group of cells using "IF" in third Chuckak Excel Worksheet Functions 2 November 10th 04 06:04 PM


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