How to Freeze Top Two Rows in Excel (4 ways)

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 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.

excel freeze top 2 rows


Download Practice Workbook


4 Quick and Easy Methods to Freeze Top Two Rows in Excel

Method 1: Freeze Top Two Rows Using View Tab

Excel has some in-built 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.

excel freeze top 2 rows by view tab
Now, we will go to the View tab and click Freeze Panes option from there, as shown in the following image.


Now, we have to click the Freeze Panes option from there.

excel freeze top 2 rows by View Tab
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, the row is still visible. That’s the magic.

Read More: How to Freeze Top 3 Rows in Excel (3 Methods)


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.

excel freeze top 2 rows by ALT Key
Now, we will press F.


Now, again press F.

excel freeze top 2 rows using shortcut
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: Keyboard Shortcut to Freeze Panes in Excel (3 Shortcuts)


Similar Readings: 


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.

excel freeze top 2 rows by VBA
In the pop-up code window, from the menu bar, click Insert -> Module.

Freeze Top Two Rows via VBANow, 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.

excel freeze top 2 rowsby vba
Now, if we go back to the workbook, we will see the top two rows are frozen.

Read More: How to Freeze Panes with VBA in Excel (5 Suitable Ways)


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.

excel freeze top 2 rows by magic button
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.

excel freeze top two rows by quick access
Now, click on any cell in row C and click the toolbar.


Now, select Freeze Panes from the options.

excel freeze top 2 rows using quick access bar
That’s all, simple. The top two rows are frozen.

Related Content: How to Freeze Selected Panes in Excel (10 Ways)


Things to remember

Always, click on the cell below the row or rows you want to freeze. For example, if you want to freeze top two rows, you have to click on any cell in the third row.


Practice Section

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.

excel freeze 2 panes


Conclusion

So, these are four different ways to freeze 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. You may also browse this site’s other Excel-related topics.


Related Articles

Mahbub
We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo