"Sort Data" omits Row 1

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have many times experienced that when I select a range of data (e.g. 100
rows), and ask Excel to sort it in ascending/descending order, it only sorts
rows 2-100. The values in row 1 are left in their original position,
regardless of where they rank according to my criteria.
I am now buliding a database in which I want to include several sort-macros,
where this problem appears. Any suggestions for me?

Thanks
 
Thank you for a quick and helpful response. Changed macro setting from
xlGuess to xlNo, and that did it!
 
Zyvind,

Ah-HAH! You didn't tell us it was a macro, and what the code is. Just for
a little clarification, it wants to know if the first row is a column
header, and should remain at the first row, or a regular record, where it
should be sorted. When you use Data - Sort, you specify whether the first
row is a header or not. When you use the sort buttons on the toolbar, it
guesses.

Here's the rub: Unfortunately, even when you use Data - Sort, where you
specify the first row as being a header or not, the macro recorder might put
xlNo, xlGuess, or whatever it wants, depending on whether the first row
looks to it like a header (it looks for different formatting and I don't
know what-all). I've found it's best to check what it's recorded.

You'd expect to get xlGuess when using the sort buttons on the toolbar, as
you have no way of telling it about the first row being a header or not, and
it must guess. But when you've used Data - Sort, I don't know why it
doesn't faithfully record your choice about the first row.
 
I _WANT_ "Sort Data" to omit Row 1 when I select a cell in a column and use
the Sort Ascending button. This works in data tables with not many rows but
won't with the 583 rows in the one I'm working on. How do I force it to do
this without a hidden Row 2, or using "Data>Sort>Header Row" each time (which
doesn't "stick")?
 
Try giving the header row a different format--bold, underlined.

Sometimes that's enough to give excel the hint that that row is not part of the
data.

(Although, I find the Sort buttons on the toolbar too dangerous--it's too easy
to not include adjacent columns by mistake.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top