Sometimes, we have to deal with a huge number of data in Excel. The data may contain lots of rows and columns. That’s why, when we scroll down, the header gets invisible. But, no need to get intimidated about this. In this article, I am going to show you 4 quick and simple methods to get rid of this problem. In this article, I will show you how to freeze the top two rows in Excel using the View Tab, Shortcut Key, Magic Freeze Button, and VBA.
For your better understanding, we are going to use a sample data set containing Last Names, Ages, Occupations, Marital Status, Gender, and Country.
How to Freeze Top Two Rows in Excel: 4 Quick and Easy Methods
Method 1: Freeze Top Two Rows Using View Tab
Excel has some built-in features to freeze any number of rows or columns. In this data set, we want to freeze the top two rows. So, the question is, how you will do this?
First, click below the cell you want to freeze the rows. For this data set click on cell A3.
Now, we will go to the View tab and click the Freeze Panes option from there, as shown in the following image.
Now, we have to click the Freeze Panes option from there.
After that, our dataset will look like the following image.
You can see the top two rows got frozen, we scrolled down to the 20th row, and the row is still visible. That’s the magic.
Read More: How to Freeze Top Row in Excel
Method 2: Freezing Top Two Rows Using Shortcut key
We can also use a shortcut key to freeze the top two rows if we want. Let’s see, how to do this.
First, click on cell A3, as we want to freeze the cell above this row.
Then, press ALT + W
After that, our screen will look like the image below.
Now, we will press F.
Now, again press F.
So, here we go. If we look closely, there is a horizontal line in row 2.
Finally, we are done.
If you want me simplify, first press ALT+F, then F, again F.
Effortless. What do you say?
Read More: How to Freeze Top 3 Rows in Excel
Method 3: Freeze Top Two Rows in Excel Using VBA
We can freeze the top two rows in Excel VBA also. Here is how,
Press Alt + F11 on your keyboard or go to the tab Developer -> Visual Basic to open Visual Basic Editor.
In the pop-up code window, from the menu bar, click Insert -> Module.
Now, copy the following code and paste it into the Module.
Sub FreezingTopTwoRows() Rows("3:3").Select ActiveWindow.FreezePanes = True End Sub
Via this code, we are telling Excel to freeze rows above row 3:3.
By, Sub we have created a subprocedure FreezingTopTwoRows, after that, we selected the Row above which we want to freeze by Rows.Select method. After that, we used another method called ActiveWindows.FreezePanes to freeze the rows we want.
Now, our code is ready to run. Press F5 on your keyboard or from the menu bar select Run -> Run Sub/User Form. You can also just click on the Small Play Icon in the sub-menu bar to run the macro.
Now, if we go back to the workbook, we will see the top two rows are frozen.
Read More: How to Freeze Columns in Excel
Method 4: Freeze Top Two Rows By Magic Freeze Button
In this method, I will show you, how to add the Freez button in the quick access bar and freeze the top two rows in Excel quickly.
First, go to the top of the worksheet and click on the down arrow, and then more commands, as the following image shows.
Now, a new dialogue box will pop up. At this point, we have to add the Freeze Panes from the box at the left.
So, first, select the Freeze Panes option then click Add. After that, it will be placed in the right-side box. Now, click OK.
As a result, you can see a quick access toolbar is added and visible.
Now, click on any cell in row C and click the toolbar.
Now, select Freeze Panes from the options.
That’s all, simple. The top two rows are frozen.
Related Content: How to Freeze 2 Columns in Excel
Things to remember
Always, click on the cell below the row or rows you want to freeze. For example, if you want to freeze the top two rows, you have to click on any cell in the third row.
The single most crucial aspect in becoming accustomed to these quick approaches is practice. As a result, I’ve attached a practice worksheet where you may practice these methods.
Download Practice Workbook
So, these are four different ways to freeze the top two rows in Excel. Based on your preferences, you may choose the best alternative. Please leave them in the comments area if you have any questions or feedback.