How to Hide Rows and Columns in Excel (10 Ways)

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.

Hide Rows and Columns in Excel


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.

Perform the Keyboard Shortcuts to Hide Rows and Columns in Excel

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

Perform the Keyboard Shortcuts to Hide Rows and Columns in Excel

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

Use the Mouse to Hide Rows and Columns in Excel

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

Use the Mouse to Hide Rows and Columns in Excel

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

Use the Mouse to Hide Rows and Columns in Excel

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

Use the Mouse to Hide Rows and Columns in Excel

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

Apply the Format command to Hide Rows and Columns in Excel

  • Further, from your Home ribbon, go to,

Home → Cells → Format → Hide & Unhide → Hide Rows

Apply the Format command to Hide Rows and Columns in Excel

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

Apply the Format command to Hide Rows and Columns in Excel

  • Hence, from your Home ribbon, go to,

Home → Cells → Format → Hide & Unhide → Hide Columns

Apply the Format command to Hide Rows and Columns in Excel

  • 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


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.

Use the Group Feature to Hide Rows and Columns in Excel

  • After selecting the rows from 6 to 8, from your Data ribbon, go to,

Data → Outline → Group → Group

Use the Group Feature to Hide Rows and Columns in Excel

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

Use the Group Feature to Hide Rows and Columns in Excel

  • After completing the above process, you will be able to hide the selected rows.

Use the Group Feature to Hide Rows and Columns in Excel


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.

Use the Group Feature to Hide Rows and Columns in Excel

  • After that, from your Data ribbon, go to,

Data → Outline → Group → Group

Use the Group Feature to Hide Rows and Columns in Excel

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.

Use the Group Feature to Hide Rows and Columns in Excel

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

Use the Group Feature to Hide Rows and Columns in Excel

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.

Run a VBA Code to Hide Rows and Columns in Excel

Secondly, go to,

Insert → Module

Run a VBA Code to Hide Rows and Columns in Excel

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.

Run a VBA Code to Hide Rows and Columns in Excel

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

Run a VBA Code to Hide Rows and Columns in Excel

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.

Run a VBA Code to Hide Rows and Columns in Excel

Step 2:

  • Then type the VBA code in the created Module.
Sub Hide_Columns_VBA()
Columns("C:E").Hidden = True
End Sub

Run a VBA Code to Hide Rows and Columns in Excel

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

Run a VBA Code to Hide Rows and Columns in Excel

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

Md. Abdur Rahim Rasel

Md. Abdur Rahim Rasel

Hi! I'm Md. Abdur Rahim Rasel. Welcome to my Profile. Currently, I am working and doing research on Microsoft Excel and here I will be posting articles related to this. I have completed my graduation in Naval Architecture and Marine Engineering(NAME) from Bangladesh University of Engineering and Technology(BUET). I have a passion for learning new things with my knowledge through perseverance and hard work.

We will be happy to hear your thoughts

Leave a reply

ExcelDemy
Logo