ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Automatic Sort for variable Ranges (https://www.excelbanter.com/excel-worksheet-functions/96421-automatic-sort-variable-ranges.html)

bman342

Automatic Sort for variable Ranges
 
(Apologize if this is posted already)

I regularly import data into a spreadsheet.
The range of data elements varies each time.
I need to sort the data a couple of ways.

I recorded a macro to sort the data:
-I start on a consistent cell (say A4) where I know the first data element
will always be.
-I then highlight an area to a cell range that will define a range larger
than the amount of data elements I will ever import (say: A4:A300).
I then perform the sort.

When i do an alphabetical sort, it places the blank cells at top which is
sub-optimal.

Is there a way to automatically highlight only the cells with data, and then
perform the sort?

Thanks.


Ardus Petus

Automatic Sort for variable Ranges
 
Select first cell (says A4)
Hit Ctrl+Shift+Down arrow

Then you have selected the data you can now sort.

HTH
--
AP

"bman342" a écrit dans le message de
news: ...
(Apologize if this is posted already)

I regularly import data into a spreadsheet.
The range of data elements varies each time.
I need to sort the data a couple of ways.

I recorded a macro to sort the data:
-I start on a consistent cell (say A4) where I know the first data element
will always be.
-I then highlight an area to a cell range that will define a range larger
than the amount of data elements I will ever import (say: A4:A300).
I then perform the sort.

When i do an alphabetical sort, it places the blank cells at top which is
sub-optimal.

Is there a way to automatically highlight only the cells with data, and
then
perform the sort?

Thanks.




bman342

Automatic Sort for variable Ranges
 
Hmm, that was pretty easy. Thanks a bunch!

"Ardus Petus" wrote:

Select first cell (says A4)
Hit Ctrl+Shift+Down arrow

Then you have selected the data you can now sort.

HTH
--
AP

"bman342" a écrit dans le message de
news: ...
(Apologize if this is posted already)

I regularly import data into a spreadsheet.
The range of data elements varies each time.
I need to sort the data a couple of ways.

I recorded a macro to sort the data:
-I start on a consistent cell (say A4) where I know the first data element
will always be.
-I then highlight an area to a cell range that will define a range larger
than the amount of data elements I will ever import (say: A4:A300).
I then perform the sort.

When i do an alphabetical sort, it places the blank cells at top which is
sub-optimal.

Is there a way to automatically highlight only the cells with data, and
then
perform the sort?

Thanks.






All times are GMT +1. The time now is 10:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com