Sort Ascending issue

  • Thread starter Thread starter Doug
  • Start date Start date
D

Doug

WinXP, Office XP

I have a worksheet with my contact database, and the top
line is a grey'd column description header. When i sort
by ascending, the header stays put, which is great. I'm
just curious how it does that?

thanks

doug
 
Doug,

Excel (if you sort from the menu buttons) just assumes there *IS* a header
row and doesn't take that up in the sort.
You can see that if you put just numbers ("middle value") in that grey line
and sort by pressing the menu button.

If you sort via DATA / SORT you have a checkbox : header row of no header
row

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
Hi Doug!

There is a checkbox but Excel is fairly smart and makes a guess as to
whether you have included the header in the range. It seems that if
there is a blank row above the range you have selected, it assumes
that the first row is a header. If the row above is not blank it
assumes that the first row is not a header.

But you can over-ride this by placing a check in the appropriate box.
The only time it's important is when using Data Sort in a VBA
subroutine. I have found cases where the guess is wrong for the data I
want sorted and for safety sake I change to what I want.

--
Regards
Norman Harker MVP (Excel)
Sydney, Australia
(e-mail address removed)
Excel and Word Function Lists (Classifications, Syntax and Arguments)
available free to good homes.
 
Back
Top