This article illustrates how to lock rows in Excel when scrolling. This is necessary when you need to keep the top rows always visible. You can lock single or multiple top rows as required. This article also shows how to lock multiple top rows and leftmost columns at the same time. The following picture highlights the purpose of this article. Have a quick look through the article to learn how to do that.
How to Lock Rows in Excel When Scrolling: 4 Ways
Imagine you have the following dataset containing sales made by employees in different years.
Now, if you try to scroll down through the data, then you won’t see the years in the top row visible anymore. This makes it a bit difficult to understand the data.
Follow the methods below to solve this issue.
1. Lock Top Row in Excel When Scrolling
- First, you need to make sure that the row you want to lock is visible at the top. You can scroll up to do so.
- Then select View >> Freeze Panes >> Freeze Top Row as shown in the picture below.
- After that, the top row will not move when you start scrolling down.
- If Row 10 for example, is visible at the top, then it will be locked instead. Moreover, you won’t be able to see rows 1 to 9.
Read More: Keyboard Shortcut to Freeze Panes in Excel
2. Freeze Multiple Top Rows in Excel
Now, assume you want to lock the top 5 rows. Then select row number 6 as shown below.
- Then, select View >> Freeze Panes >> Freeze Panes as shown in the following picture.
- After that, the top 5 rows won’t move when you scroll down.
Read More: How to Freeze Top Row in Excel
- How to Freeze Top Two Rows in Excel
- How to Freeze Top 3 Rows in Excel
- How to Freeze Columns in Excel
- How to Freeze 2 Columns in Excel
- How to Freeze First 3 Columns in Excel
3. Hide and Lock Top Rows in Excel
Alternatively, you can hide the top 4 rows as shown below.
- You will see a solid green border at the top after hiding the rows. Now, row 5 is visible at the top instead of row 1.
- Next, select View >> Freeze Panes >> Freeze Top Row as in the earlier method. Now, you can unhide the hidden rows.
- Do not select View >> Freeze Panes >> Freeze Panes if there are hidden rows. Otherwise, an arbitrary number of rows and columns will be locked.
Read More: How to Freeze Multiple Panes in Excel
4. Lock the Top Rows and Left Columns
If you lock the top row, it won’t move when you scroll down. But, if you scroll horizontally, you won’t see the employee names visible. This creates a similar problem.
- Now, to fix this problem, select cell B2. Remember you want to lock the top row and first column at the same time. Now, notice that cell B2 is right below the top row and immediately right to the first column.
- Then, select View >> Freeze Panes >> Freeze Panes as earlier. After that, the top row and the first column won’t move when you scroll horizontally or vertically.
- Now assume you want to lock the top 4 rows and the first 3 Then, you need to determine the cell right below row 4 and immediately right to the 3rd column. As cell D5 fulfills the criteria, select cell D5. After that, select View >> Freeze Panes >> Freeze Panes as in the earlier methods.
Finally, you will get the desired result as shown in the picture below.👇
Unlock Top Rows in Excel
You can just select View >> Freeze Panes >> Unfreeze Panes to unlock the rows as shown below.
Things to Remember
Before using the Freeze Panes command,
- Select the row just below the row that you want to lock.
- Or, select the column immediately right to the column that you want to lock.
- Or, select the cell just below the rows and immediately after the columns that you want to lock.
Download Practice Workbook
You can download the practice workbook from the download button below.
Now you know how to lock rows in Excel when scrolling. Please let us know if this article has helped you to solve your problem. You can also use the comment section below for further queries or suggestions. Do visit our ExcelDemy blog to explore more about Excel. Stay with us and keep learning.