You might want to hide rows and columns in Microsoft Excel to conceal personal or perplexing data. We can easily hide rows and columns in Excel by using the keyboard shortcuts, Mouse Right-Click, Format command, and VBA Macros also. In this article, we’ll learn ten quick and suitable ways how we can hide rows and columns in Excel.
Download Practice Workbook
Download this practice workbook to exercise while you are reading this article.
10 Suitable Ways to Hide Rows and Columns in Excel
Let’s say, we have a dataset that contains information about 12 different students of ABC School. The Name of the students and ID of those students and their marks in Physics, Chemistry, and Mathematics are given in Columns B, C, D, E, and F respectively. We might hide rows and columns in Excel by using the keyboard shortcuts, Mouse Right-Click, Format command, and VBA Macros also. Here’s an overview of the dataset for today’s task.
1. Perform the Keyboard Shortcuts to Hide Rows and Columns in Excel
To hide rows and columns in Excel by using keyboard shortcuts is the easiest way. Let’s follow the steps below on how to hide rows and columns.
1.1 Apply the Keyboard Shortcuts to Hide Rows
First, we will learn how to hide rows and then learn how to hide columns. Let’s follow the instructions below.
Steps:
- First of all, select rows 8, 9, and 10 that contain Scott, Samuel, and Frank’s information.
- After selecting the rows array, simply press Ctrl + 9 simultaneously on your keyboard, and you will be able to hide those rows.
1.2 Use the Keyboard Shortcuts to Hide Columns
In this sub-method, we will hide marks in Physics, and Chemistry that has been given in columns D, and E respectively. Let’s follow the steps below to learn!
Steps:
- First, select columns D, and E that contain marks in Physics, and Chemistry.
- Hence, press Ctrl + 0 simultaneously on your keyboard, and you will be able to hide columns D, and E that has been given in the below screenshot.
Read More: Hide Rows and Columns in Excel: Shortcut & Other Techniques
2. Use the Mouse to Hide Rows and Columns in Excel
Another easiest way is to hide rows and columns in Excel by using the mouse Right-Click. Just follow the steps below to learn!
2.1 Hide Rows
In this sub-method, we will hide the rows that contain the information of Justin, Scott, and Patrick. Please follow the steps below.
Steps:
- First, select rows 7, 8, and 11.
- Then, place your cursor upon any selected rows, and press right-click on your mouse. Hence, a window pops up. From that window select the Hide option.
- By clicking on the Hide option, you will be able to hide rows.
2.2 Hide Columns
Now, we will hide the columns that contain the information on Physics and Mathematics. Please follow the steps below to learn!
Steps:
- First, select columns D, and F.
- Hence, place your cursor upon any selected columns, and press right-click on your mouse. Then, a window pops up. From that window select the Hide option.
- By clicking on the Hide option, you will be able to hide selected columns.
Read More: [Fixed!] Missing Row Numbers and Column Letters in Excel (3 Solutions)
3. Apply the Format command to Hide Rows and Columns in Excel
To hide rows and columns, now, we will apply the Format command. This is the easiest and time-saving way to hide rows and columns in Excel.
3.1 Use the Format command to Hide Rows
We might hide the rows from 9 to 14 that contains the information of Samuel, Frank, Patrick, Jack, Bob, and Cathy. Let’s follow the steps below.
Steps:
- First of all, select rows from 9 to 14.
- Further, from your Home ribbon, go to,
Home → Cells → Format → Hide & Unhide → Hide Rows
- Hence, you will get your desired output that has been given below screenshot.
3.2 Format Command to Hide Columns
Now, we will hide the columns that contain the information on Physics and Chemistry. Please follow the steps below to learn!
Steps:
- First, select columns D, and E.
- Hence, from your Home ribbon, go to,
Home → Cells → Format → Hide & Unhide → Hide Columns
- After clicking on the Hide Columns option, you will be able to hide columns D, and E.
Read More: How to Add Rows and Columns in Excel (3 Easy Methods)
Similar Readings
- How to Switch Rows and Columns in Excel Chart (2 Methods)
- [Fixed!] Rows and Columns Are Both Numbers in Excel
- How to Transpose Column to Multiple Rows in Excel (6 Methods)
- Excel VBA: Set Range by Row and Column Number (3 Examples)
- How to Add Multiple Rows and Columns in Excel (Every Possible Way)
4. Use the Group Feature to Hide Rows and Columns in Excel
In this method, we’ll learn how to hide rows and columns in Excel by using the Group feature. Follow the below steps.
4.1 Group Feature to Hide Rows
Here, we’ll learn how to hide rows from 6 to 8 that contains the information of Lary, Justin, and Scott. Just follow the below steps to learn!
Step 1:
- First, select rows from 6 to 8.
- After selecting the rows from 6 to 8, from your Data ribbon, go to,
Data → Outline → Group → Group
- By clicking on the Group option, a Group dialog box will appear in front of you. From the Group window, firstly select Rows, and at last, press OK.
Step 2:
- Hence, the Minus(-) sign will pop up on the left-most side of the rows number, and then, press on the Minus(-) sign to hide rows.
- After completing the above process, you will be able to hide the selected rows.
4.2 Group Feature to Hide Columns
Now, we will hide the columns that contain the information on Physics and Chemistry. Please follow the steps below to learn!
Step 1:
- First, select columns C to E.
- After that, from your Data ribbon, go to,
Data → Outline → Group → Group
Step 2:
- Hence, a Group dialog box will appear in front of you. From the Group window, firstly select Columns, and at last, press OK.
- Further, the Minus(-) sign will appear on the top-most side of the columns, and then, press on the Minus(-) sign to hide columns.
- Finally, you will get your desired output that has been given below screenshot.
Read More: Excel VBA: Get Row and Column Number from Cell Address (4 Methods)
5. Run a VBA Code to Hide Rows and Columns in Excel
Here, we’ll apply a VBA code to hide rows and columns. We can do that effectively as the code is quite simple. To apply the code, you need to insert a module. Firstly, open a module, go to,
Developer → Visual Basic.
Secondly, go to,
Insert → Module
Now, we can use the VBA code in two ways. Let’s follow the steps below.
5.1 Hide Rows by Applying VBA Code
Now, we will hide rows from 6 to 10. Please follow the steps.
Step 1:
- First of all, select rows from 6 to 10.
Step 2:
- Then type the VBA code in the created Module.
Sub Hide_Rows_VBA()
Rows("6:10").Hidden = True
End Sub
- After typing the code into that module, now, we run the code, to do that, go to,
Run → Run Sub/UserForm
Step 3:
- Thereafter, run the code and the output will be like the following.
5.2 Â Hide Columns by Using VBA Code
Now, we will hide columns from C to E. Please follow the instructions below.
Step 1:
- First of all, select cells C4 to E16.
Step 2:
- Then type the VBA code in the created Module.
Sub Hide_Columns_VBA()
Columns("C:E").Hidden = True
End Sub
- Further, we run the code, to do that, go to,
Run → Run Sub/UserForm
Step 3:
- Thereafter, run the code and the output will be like the following.
Read More: How to Freeze Rows and Columns at the Same Time in Excel
Things to Remember
↪ If Developer Menu does not appear in the Menu Bar, press ALT + F11 keys on your keyboard to open the Microsoft Visual Basic for Applications window.
Conclusion
I hope all of the suitable methods mentioned above to hide rows and columns will now provoke you to apply them in your Excel spreadsheets with more productivity. You are most welcome to feel free to comment if you have any questions or queries.
Further Readings
- Excel Macro: Convert Multiple Rows to Columns (3 Examples)
- How to Convert Multiple Rows to Columns in Excel (9 Ways)
- Excel VBA to Set Range Using Row and Column Numbers (4 Examples)
- How to Transpose Multiple Columns to Rows in Excel
- Move Row/Column in Excel Without Replacing Existing Data (3 Best Ways)
- How to Switch Rows and Columns in Excel (5 Methods)