How to lock rows in Excel for sorting

In this tutorial, we will learn, how to lock rows in Excel for sorting. Our dataset above contains information about clients who made reservations, including their ID, name, and gender. We want to prevent the user from sorting the rows that include the name and ID columns. To accomplish this, we will use the “lock screen” option to freeze these rows in place and prevent them from being sorted.

When you lock rows in Excel for sorting, it means that you keep specific rows, such as the header row or any other important rows, in a fixed position while sorting the data in the remaining rows.  locking rows in Excel for sorting helps to ensure that important information remains visible and organized even after sorting, making it easier to analyze and understand the data.

Step 1 – Select the Rows

– Select the rows that you want to lock

Step 2 – Open the Context menu

– After selecting the rows, right-click anywhere on the  selected region and a context menu will appear

Step 3 – Click on the Format cell option

– From the drop-down menu, click on the Format cell option and a dialog box will appear

Step 4 – Click on the Protection tab

– In the dialog box, click on the Protection tab

Step 5 – Click on Locked

– In the Protection tab, click on the Locked option
– Then click on OK

Step 6 – Click on the Protect Sheet option

– Click on the Protect Sheet option, in the Protect group of the Review tab, and a dialog box will appear

Step 7 – Set the password

– In the dialog box, type the password that will be used to unprotect the sheet

Step 8 – Click on the option you want to use

– After typing the password, click on the checkboxes of options (other than Sort option) that you to perform after locking
– After selecting the options, click on Ok and a dialog box will appear

Step 9 – ReEnter the Password

– In the Confirm Password dialog box, re-enter the password, to confirm the password

Step 10 – Click on OK

– After selecting the options, click on OK and the Sort option will not be available  for locked cells