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.


Download Practice Workbook

You can download the practice workbook that we have used to prepare this article.


5 Methods to Freeze 2 Columns in Excel

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 column A and B so that columns having Student Name and ID is 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 (4 Quick Ways)


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 Selected Panes in Excel (10 Ways)


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: Keyboard Shortcut to Freeze Panes in Excel (3 Shortcuts)


Similar Readings:


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 Panes with VBA in Excel (5 Suitable Ways)


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 Row and First Column in Excel (5 Methods)


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 below keyboard shortcuts too to unfreeze columns.

Alt + W + F + F

Related Content: How to Apply Custom Freeze Panes in Excel (3 Easy Ways)


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.

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

Hosne Ara

Hosne Ara

Hi, This is Hosne Ara. Currently, I do write for ExcelDemy. I have a long experience working with different industries and I have seen how vast the scope of Microsoft Excel is. So, eventually, I started to write articles on Excel and VBA. Basically, my articles are targeted to help people who are working in Excel. By profession, I am an Engineer. Materials and Metallurgical Engineering is my major. Besides, I am a certified Project Manager (PMP) too. I have worked with Power Plant and IT industry earlier. As a person, I am detail-oriented and love doing research. Establishing a greener world is one of my mottos.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo