LearnExcel.io
Menu

How to Lock First Row in Excel

Written by ··Updated June 16, 2026
How to Lock First Row in Excel

To lock the first row in Excel so it stays visible while you scroll, go to the View tab, click Freeze Panes, and choose Freeze Top Row. This keeps your header row pinned at the top of the worksheet and works the same way in both Windows and Mac versions of Excel.

Welcome to this blog post on how to lock the first row in Excel. If you work with large tables or data in Excel, you may have noticed that scrolling down through your sheet can be confusing when the headers or other important information in the first row disappear. To address this issue, we’ll go through some simple steps that you can follow to keep the first row visible regardless of how far you have scrolled down. This post provides a quick and direct answer for those who need to lock the first row in Excel, so let’s get started!

Step 1: Open Excel and Select Your Table

First, open an Excel document that contains a table. Select and highlight the first row that you want to lock. This row can contain column headers or other important information that you want to remain visible even when scrolling through your sheet.

Step 2: Click on ‘View’ and Select ‘Freeze Panes’

Next, click on the ‘View’ tab in the top ribbon of the Excel document. Under the ‘Window’ section in the ribbon, you will find the ‘Freeze Panes’ drop-down menu. Click on this menu to reveal options for freezing panes in your Excel sheet.

Step 3: Choose ‘Freeze Top Row’ From the Drop-Down Menu

In the ‘Freeze Panes’ menu, choose the ‘Freeze Top Row’ option. Excel will now freeze the top row of your selected table, making it visible and locked in place as you scroll down the sheet.

Step 4: Test Your Freeze Panes Setting

Test your freeze panes setting by scrolling down your sheet and making sure that the first row remains visible at the top of your table. If, for some reason, the setting did not work, return to the ‘Freeze Panes’ drop-down menu and select ‘Unfreeze Panes.’ You can then repeat the previous steps to lock the first row of your table.

Additional Tips

Unfreezing Panes

If you need to modify or remove the freeze panes setting, simply navigate back to the ‘Freeze Panes’ drop-down menu and select ‘Unfreeze Panes’. Your Excel sheet will return to its normal scroll function. For more detail, see our guide on how to unfreeze panes in Excel.

Freeze Multiple Rows or Columns

If you want to freeze multiple rows or columns, select the cell immediately below the last row or to the right of the last column you want to freeze. Then, repeat the steps above by selecting the ‘Freeze Panes’ drop-down menu and choosing the appropriate option: ‘Freeze Panes’ or ‘Freeze Top Row’, depending on your needs. See our walkthroughs on how to freeze multiple rows in Excel and how to freeze the top two rows in Excel for step-by-step instructions.

Why Locking the First Row is Important

Locking the first row in Excel is a way to keep your table organized, especially when working with large amounts of data. Critical information such as column headers, row titles, or other important data can stay visible even when you move down the worksheet.

Alternative Ways to Freeze Panes

Aside from freezing the top row, you can also freeze the first column or both the first row and first column. All of these options can be found in the ‘Freeze Panes’ drop-down menu in the ‘View’ tab. For related techniques, see how to freeze a column in Excel and how to freeze the top row and first column together.

Using Shortcuts to Lock the First Row

If you’re a fan of keyboard shortcuts, there’s good news for you. You can lock the first row by selecting it and then pressing ‘Alt + W + F + R’ on your keyboard.

When Locking the First Row Doesn’t Work

If for some reason you’re unable to freeze the top row, there could be a few reasons why. The first is that you may have data placed directly above your first row. In this case, you’ll want to move your first row down a few rows, so it’s not directly below a cell with data. The other issue could be a limitation of the Excel version you are using.

Locking the first row in Excel is a simple way to keep your table neat and organized, regardless of how much data you’re working with. It will allow you to keep important information at the top of your sheet, no matter how far you scroll. So give it a try today and see how much easier it is to work with large tables in Excel!

FAQs

Here are some frequently asked questions about locking the first row in Excel:

Can I freeze more than one row?

Yes, you can freeze more than one row by selecting the first cell below the last row you want to freeze. Then, navigate to the ‘Freeze Panes’ drop-down menu and select ‘Freeze Panes.’

Can I freeze a specific row, other than the first row?

Yes, you can freeze any row in your Excel sheet, not just the first row. Simply select the row you want to freeze, navigate to the ‘Freeze Panes’ drop-down menu, and choose the ‘Freeze Panes’ option.

What if I need to update the data in my frozen row?

You can still update and edit the data in your frozen row even after it’s been locked. Simply select the cell you want to update, make the necessary edits, and Excel will take care of the rest.

Can I lock columns as well as rows?

Yes, you can freeze columns in Excel as well as rows. Simply select the first cell to the right of the last column you want to freeze, and choose the appropriate option from the ‘Freeze Panes’ drop-down menu.

Can I use freeze panes in older versions of Excel?

Yes, freeze panes is a feature that has been available in Excel for many years. While the locations of the option in the top ribbon of the Excel document may vary slightly between versions, you should still be able to utilize the freeze panes feature in older versions of Excel.

Frequently Asked Questions

What is the fastest way to lock the first row in Excel?

The quickest method is to go to the View tab and choose Freeze Panes → Freeze Top Row. You do not even need to select a cell first — Excel always freezes the very top visible row. On Windows you can also use the keyboard sequence Alt + W + F + R.

Does freezing the top row work the same on Mac and Windows?

Yes. On both Windows and Mac, open the View tab, click Freeze Panes, and select Freeze Top Row. The ribbon layout looks slightly different on a Mac, but the menu names and behavior are identical. The Alt + W + F + R shortcut is Windows-only.

What is the difference between locking a row to keep it visible and locking a row so it can’t be edited?

These are two different features that are easy to confuse. Freeze Top Row (under View → Freeze Panes) only keeps the row visible while you scroll — it does not stop anyone from editing it. To prevent a row from being changed, you need to lock its cells and then protect the worksheet. See how to lock a row in Excel and how to lock cells in Excel for that workflow.

How do I stop my header row from being edited after I freeze it?

Freezing does not lock cells for editing. To protect the contents, select the row, open Format Cells → Protection and confirm the Locked box is checked, then turn on sheet protection. Our guide on locking an Excel sheet for editing walks through enabling protection so the frozen header can no longer be changed.

Why can’t I freeze the top row in my worksheet?

The most common cause is that you are in cell-editing mode or have a filter, table, or Page Layout view active — switch back to Normal view first. If the Freeze Panes option is greyed out, make sure you are not editing a cell. You may also need to remove scroll lock in Excel if scrolling behaves unexpectedly, or check why you can’t scroll in Excel at all.

How do I keep both the top row and the left column visible at once?

Click the cell in B2 (just below the row and to the right of the column you want to keep), then choose View → Freeze Panes → Freeze Panes. This pins everything above and to the left. For a dedicated walkthrough, see how to freeze the top row and first column in Excel.

Related guides

How To

How to Capitalize First Letter in Excel

Learn how to quickly and easily capitalize the first letter of any word in Microsoft Excel using these simple steps. Improve the readability and professionalism of your spreadsheets.

May 21, 2023

View all Excel Basics and General Knowledge guides →