Unexpected behavior in Excel when sorting

  • #1
DaveC426913
Gold Member
22,530
6,192
TL;DR Summary
When I try to sort a spreadsheet, it ignores the first row (not a header.)
I'm trying to sort this sheet in Excel. I want to sort it on Column D.

1698778735967.png


I select the entire page by clicking the black arrow in the upper left corner:

1698778755418.png


Now I Data > Sort which brings up a dialogue where I specify the column I want to sort by :

1698778780227.png


(I can already tell there may be a problem - the first row has become deselected. This was not my doing. It happens every time):

1698778792033.png


An indeed, the sheet is sorted on column D, except the first row:

1698778811534.png


It doesn't matter how many times I do this - it's not a slip of the thumb - it always happens on this sheet. (And I have encountered this before, so it's not an artefact of this sheet only).

It's not a matter of data type of something life that. It happens on any other column I try to sort on:This is sorting on column A:

1698778859779.png


This is sorting on column F:

1698778872229.png


The only thing that worked was to cut and paste the row from the top to the bottom:

1698778913531.png


And now it sorts OK:

1698778939998.png
What am I doing wrong?
 
Computer science news on Phys.org
  • #2
[ UPDATE ]
Man there is nothing so effective for trouble-shooting as writing up the problem unambiguously in preparation for asking for help... :sorry:

When I went to update the veeery last screenshot, I saw this:
1698779437151.png
 
  • Like
  • Haha
Likes jrmichler, berkeman, jedishrfu and 4 others
  • #3
Is that why your first post has all strikeout text?
 
  • #4
jedishrfu said:
Is that why your first post has all strikeout text?
Yes. Save readers the time of reading through it all, only to discover I'd found the answer.

And I figured, since I'd already made the entire post, deleting it would only deprive some future readers in the same boat from reaping the benefit of my trials and tribulations.
 
  • Like
Likes jedishrfu, Baluncore and berkeman
  • #5
DaveC426913 said:
Man there is nothing so effective for trouble-shooting as writing up the problem unambiguously in preparation for asking for help...
Also for solving engineering problems....
 
  • #6
Probably the most important advantage of a forum like PF, is that the OP needs to work out what question to ask. After reading threads like this, we all become humbler.

“The only interesting answers are those which destroy the question”. —Susan Sontag
 
  • Like
Likes DaveC426913
  • #7
Dave, I also had to track this down one time. Obvious once you know about the option but MS Office software has SO many options that it's hard to keep track of them all.
 
  • #8
phinds said:
Dave, I also had to track this down one time. Obvious once you know about the option but MS Office software has SO many options that it's hard to keep track of them all.
Indeed. The gotcha in this case was that it the first row's behavior hinted at being a header, but the only way to define a row to behave as a header is to "freeze" it. Which of course, I did not do.

Knowing that's how Excel "handles" headers, one would not think to go looking for an option on a dialogue that said, effectively "Don't become a header, just pretend to act like one - for the moment - and then go back to being a regular row, like nothing ever happened." :mad:
 
  • Informative
  • Like
Likes phinds and Bystander

Similar threads

  • Computing and Technology
Replies
1
Views
968
  • Computing and Technology
Replies
3
Views
2K
Replies
27
Views
2K
  • Computing and Technology
Replies
5
Views
2K
  • Computing and Technology
Replies
14
Views
3K
  • Feedback and Announcements
Replies
6
Views
338
  • Engineering and Comp Sci Homework Help
Replies
7
Views
1K
  • Programming and Computer Science
Replies
2
Views
1K
  • Programming and Computer Science
Replies
4
Views
403
  • MATLAB, Maple, Mathematica, LaTeX
Replies
18
Views
5K
Back
Top