How to Freeze 2 Columns in Excel (5 Methods)

In this tutorial, I will discuss how to freeze 2 columns in Excel. While scrolling in Excel worksheets, you might want specific columns to be visible all the time. Especially, when we have data in a large number of columns, freezing the first two of them seems very helpful. So, let’s explore the ways to freeze columns.


How to Freeze 2 Columns in Excel: 5 Methods

We have a dataset containing several students’ Names, IDs, Test Scores, etc. As the dataset contains scores of several tests, scrolling right to the worksheet disappears columns A and B. Now, I will freeze columns A and B so that columns having Student Name and ID are visible all the time, even when I scroll the corresponding sheet to the right.

5 Methods to Freeze 2 Columns in Excel


1. Freeze 2 Columns Using Freeze Panes Option in Excel

First, I will freeze the first two columns using the Freeze Panes option.

Steps:

  • Select the column that is next to the first 2 columns, Here, select column C.

Freeze 2 Columns Using Freeze Panes Option in Excel

  • Then from Excel Ribbon, go to View > Freeze Panes > Freeze Panes.

Freeze 2 Columns Using Freeze Panes Option in Excel

  • As a result, a gray line appears after column B, and two columns before that line are frozen.

Freeze 2 Columns Using Freeze Panes Option in Excel

📌 Dataset Starts from 1st Row:

Here, my dataset starts from row  2. In case your dataset starts from row 1 then follow the below steps.

  • Simply click Cell C1 and apply Freeze Panes by going View > Freeze Panes > Freeze Panes.

Freeze 2 Columns Using Freeze Panes Option in Excel

  • Consequently, columns A and B are frozen.

Note:

You can freeze the first two columns by using the keyboard shortcuts: Alt + W + F + F (pressing one by one).

Read More: How to Freeze First 3 Columns in Excel


2. Apply Excel Split Option to Freeze 2 Columns

The Split option is a variation of Freeze Panes. When we apply Split after the first 2 columns, it divides the Excel worksheet areas into two separate areas. In both of these areas, you can scroll the dataset right or left.

Steps:

  • First, select column C.

Apply Excel Split Option to Freeze 2 Columns

  • Then go View > Split.

Apply Excel Split Option to Freeze 2 Columns

  • As a consequence, the corresponding worksheet containing the dataset is split after the first 2 columns. You will see separate scroll areas too.

Read More: How to Freeze Columns in Excel


3. Lock 2 Columns Using Magic Freeze Button in Excel

Now, I will add the Magic Freeze button from the Quick Access Toolbar and thus freeze 2 columns in Excel.

Steps:

  • First, click on the Customize Quick Access Toolbar icon and then select the More Commands option.

Lock 2 Columns Using Magic Freeze Button in Excel

  • Consequently, the Excel Options window will appear. Now, choose the Freeze Panes command under Popular Commands, click on the Add button, and press OK.

Lock 2 Columns Using Magic Freeze Button in Excel

  • As a result, the Magic Freeze button is added to the Quick Access Toolbar.

Lock 2 Columns Using Magic Freeze Button in Excel

  • Now, similar to Method 1, select column C and click Freeze Panes from the Magic Freeze button.

  • As expected, the gray line appears and the first two columns are frozen.

Read More: How to Unfreeze Columns in Excel


4. Apply VBA to Freeze 2 Columns in Excel

Amazingly, you can use VBA to freeze 2 columns in Excel. This method is very quick and effective. Here are the procedures.

Steps:

  • First, go to the worksheet where you want to freeze 2 columns. Right-click on the sheet name and click on the View Code option to bring up the VBA window.

Apply VBA to Freeze 2 Columns in Excel

  • Then, type the below code in the Module. Here I have written Columns (C:C) in the code, as I want to freeze columns A and B. Change the code as you require.
Sub Freeze2Columns()

    Columns("C:C").Select
    ActiveWindow.FreezePanes = True

End Sub

Apply VBA to Freeze 2 Columns in Excel

  • Now, run the code by pressing the F5 key or clicking on the Run icon (see the screenshot).

Apply VBA to Freeze 2 Columns in Excel

  • Finally, the first two columns of my worksheet are frozen.

Read More: How to Freeze Top Row in Excel


5. Freeze Rows and 2 Columns Simultaneously

Till now, I have discussed only freezing the first two columns. However, you might need to freeze rows and columns simultaneously. Let’s have a look at the process of doing that.

Steps:

  • Click Cell C5 (Cell right to the column and below to the row you want to freeze).

Freeze Rows and 2 Columns Simultaneously

  • Then go to View > Freeze Panes > Freeze Panes.
  • As a result, two gray lines appear which indicates the first 2 columns and the top 4 rows are frozen.

Read More: How to Freeze Top Two Rows in Excel 


Unfreeze Columns in Excel

To unfreeze the 2 columns where we applied Freeze Panes, follow the below steps.

Steps:

  • Go to the worksheet where columns are frozen.
  • Then go to View > Freeze Panes > Unfreeze Panes.

Unfreeze Columns in excel

Note:

  • You can apply the keyboard shortcuts below to unfreeze columns.

Alt + W + F + F

Related Content: How to Freeze Top 3 Rows in Excel


Things to Remember

  • In a single Excel sheet, we cannot apply multiple Freeze Panes.
  • You cannot use both Freeze Panes and Split options at the same time in an Excel sheet.
  • If you want to lock a row or column located in the middle of the worksheet, that is not possible.

Download Practice Workbook


Conclusion

In the above article, I have tried to discuss several methods to freeze 2 columns in Excel elaborately. Hopefully, these methods and explanations will be enough to solve your problems. Please let me know if you have any queries.


Related Articles


<< Go Back to Freeze Panes | Learn Excel

Get FREE Advanced Excel Exercises with Solutions!
Hosne Ara
Hosne Ara

Hosne Ara is a materials and metallurgical engineer who loves exploring Excel and VBA programming. To her, programming is like a time-saving superhero for dealing with data, files, and the internet. She's skilled in Rhino3D, Maxsurf C++, MS Office, AutoCAD, and Excel & VBA, going beyond the basics. With a B. Sc. in Materials and Metallurgical Engineering from Bangladesh University of Engineering and Technology, she's shifted gears and now works as a content developer. In this role, she... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo