sfarnsworth
New Member
- Joined
- Aug 25, 2002
- Messages
- 3
Hi, I feel silly asking such a question. I've done some looking for the answer but haven't found it. If it's in another post, thanks to just point me in that direction...
Here's my Q...
If I have my cursor on any cell in a table and I click on "Sort" (from the pulldown) in Excel 2000, Excel selects the whole table automatically. If the table is 5 columns wide and 10 rows long, it grabs and sorts 50 cells (assuming I don't have any rows or columns in my table completely empty -- I'm OK to live with that).
If I now add two more rows of data and do exactly the same thing that I did before (Sort from the pulldown with one cell in my table selected), now, instead of sorting 50 cells, the system intelligently notices the two additional rows and now sorts the whole 60 cells. I didn't have to do anything differently.
Now, I create a macro to do this same sorting. Only now, when I add two more rows, the macro doesn't "keep up". It doesn't notice that the table now has two more rows. It has, in recording the macro, recorded exactly the size of the table at that point.
Is there any easy way to say "just go ahead and do the whole table" in the macro world like there is in the real world?
Thanks in advance.
Here's my Q...
If I have my cursor on any cell in a table and I click on "Sort" (from the pulldown) in Excel 2000, Excel selects the whole table automatically. If the table is 5 columns wide and 10 rows long, it grabs and sorts 50 cells (assuming I don't have any rows or columns in my table completely empty -- I'm OK to live with that).
If I now add two more rows of data and do exactly the same thing that I did before (Sort from the pulldown with one cell in my table selected), now, instead of sorting 50 cells, the system intelligently notices the two additional rows and now sorts the whole 60 cells. I didn't have to do anything differently.
Now, I create a macro to do this same sorting. Only now, when I add two more rows, the macro doesn't "keep up". It doesn't notice that the table now has two more rows. It has, in recording the macro, recorded exactly the size of the table at that point.
Is there any easy way to say "just go ahead and do the whole table" in the macro world like there is in the real world?
Thanks in advance.