Help with sorting and freeze.

Dan Wilson

Well-known Member
Joined
Feb 5, 2006
Messages
507
Office Version
  1. 365
Platform
  1. Windows
Good day. I am running Excel out of Office365 (updated) on Windows 10 Home (updated). I have a worksheet that contains almost 3,000 Rows and 14 Columns containing data. There are also 5 Control buttons that run Macros for the worksheet placed in Row 1, Columns O thru S. Row 1 is allotted to Column Titles and is set to 31.5 Row Height. Some of the Column headers require a format of Wrap Text due to a Column Width of 5, thus the need for the Row Height. Row 1 is also set as "Freeze Top Row". Sometimes I do sorts of the worksheet after selecting the arrow located to the left of Column A and above Row 1. This then selects the entire worksheet for sorting. After selecting the Sort options, the end result is that Row 1 gets repositioned somewhere in the worksheet rather than remaining in Row 1. The Macros also do sorts of the worksheet, but Row 1 remains in place. What am I doing wrong, or what am I not doing in the sort selections to prevent the movement of Row 1? Thank you for any help with this.
 

Excel Facts

Convert text numbers to real numbers
Select a column containing text numbers. Press Alt+D E F to quickly convert text to numbers. Faster than "Convert to Number"
Post the code that is causing the issue. Someone might see what is wrong.
 
Upvote 0
Post the code that is causing the issue. Someone might see what is wrong.
Good day OaklandJim and thank you for responding. I have been doing some experimenting with this problem and I may have found the answer. I am not using any code to do the sort other than the Sort itself. By selecting the Arrow located above Row 1 and to the left of Column A, I am actually including Row 1 in the sort, thus creating the problem. By selecting the Row 2 indicator to the left of Column A and then selecting the last Row with the Shift key held down, I actually select all of the data excluding Row 1, thus keeping the Column headers in place. Thank you for the help.
 
Upvote 0
By selecting the Arrow located above Row 1 and to the left of Column A, I am actually including Row 1 in the sort, thus creating the problem.
From what I understand of what you are describing, selecting the whole worksheet should not be the problem. All you should need to do when doing your sort is check this box and the heading row will not move.

1690867879433.png
 
Upvote 0
Solution
From what I understand of what you are describing, selecting the whole worksheet should not be the problem. All you should need to do when doing your sort is check this box and the heading row will not move.

View attachment 96332
Good day Peter_SSs. Thank you for the reply. You are "spot-on" with your suggestion. I knew there was a simple answer. I tend to go toward the difficult. That makes absolute sense. This is the BEST Forum on the internet. Out of my 478 questions, there has always been an answer of two.
 
Upvote 0

Forum statistics

Threads
1,215,086
Messages
6,123,035
Members
449,092
Latest member
ikke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top