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.
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.
- Then from Excel Ribbon, go to View > Freeze Panes > Freeze Panes.
- As a result, a gray line appears after column B, and two columns before that line are frozen.
📌 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.
- 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.
- Then go View > Split.
- 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.
- Consequently, the Excel Options window will appear. Now, choose the Freeze Panes command under Popular Commands, click on the Add button, and press OK.
- As a result, the Magic Freeze button is added to the Quick Access Toolbar.
- 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:
- How to Freeze Header in Excel (Top 4 Methods)
- Freeze Top 3 Rows in Excel (3 Methods)
- Excel Freeze Panes Not Working (5 Causes with Fixes)
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.
- 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
- Now, run the code by pressing the F5 key or clicking on the Run icon (see the screenshot).
- 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).
- 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.
⏩ 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.