Sorting Multiple Columns Repeatedly

K

karpaydiem

I've built a spreadsheet of employees in rows and attributes about them
in columns.

I've recorded macros to sort on the columns (sometimes by one, two or
three columns per sort).

I began each macro by using CTL+A to select the whole sheet, then
clicked on Data>Sort to to do the sort.

I'm finding that the data is getting scrambled: that rows are not
staying together.

Is there something about multiple subsequent sorts that would mess up
my data, even though each macro starts by selecting the whole sheet?

What am I missing here?

Thanks,
Bill
 
B

Barb Reinhardt

You may want to check that when you do CTRL A, it selects the entire
spreadsheet. I"ve had to enter CTRL A CTRL A to get the entire sheet
selected. I'm not sure of the reason.
 
K

karpaydiem

Thanks Barb, for the reply. It led me in the direction that enabled me
to find the culprit and some other interesting facts. For instance, I
found this tidbit:

"Restore normal Ctrl+A before risking your data. Ctrl+A has always
meant one thing (Select everything) in all PC applications that have
any selection or editing ability. Excel 2003 has deviated from this
standard. The URL for the solution is here:

http://www.mvps.org/dmcritchie/excel/shortx2k.htm#foobar

Anyway, my particular culprit was the fact that I had inserted a blank
column, and made it very narrow so I would have a double vertical line
separating a portion of my spreadsheet. Well, it turns out that Excel
interprets a blank column as a boundary for a region and only sorts
data within the region where the cursor is. Hence, data to the right of
my double line (blank column) did NOT get sorted. Sheesh!

Anyway, the best help for sorting I found here:

http://www.mvps.org/dmcritchie/excel/sorting.htm

All sorted out for now, Bill
 
K

karpaydiem

Also, I just found this in this in Excel 2003 help file which would
explain why you need to hit CTRL+A twice in XL 2003 to get all the
cells:

To select all cells on a worksheet, do one of the following:

Click the Select All button. [drawing shows the area in the upper left
corner beyond cell A1]


Press CTRL+A.
Note If the worksheet contains data, pressing CTRL+A selects the
current region. Pressing CTRL+A a second time selects the entire
worksheet.

Tip If you want to select all cells in the active range (range: Two
or more cells on a sheet. The cells in a range can be adjacent or
nonadjacent.), press CTRL+SHIFT+*.

Leave it to MS to go against their own standards!
 
Top