How to hide every other row in Excel?

When you need to hide every other row in Excel, how could you quickly get it done? Just hiding the row one after another? Or you could go through the follow instruction to quickly hide every other row in Excel.

Hide every other row with VBA code

Hide every other row with Kutools for Excel


Hot
Amazing! Using Tabs in Excel like Firefox, Chrome, Internet Explore 10!

Learn more Free download

arrow blue right bubbleHide every other row with VBA code

The following short VBA code can help you quickly hide every other row, please do as following steps:

1. Click Developer > Visual Basic, a new Microsoft Visual Basic for applications window will be displayed, click Insert > Module, and input the following code into the Module:

Sub HideAndShow()
Dim n As Integer, i As Integer
n = Cells.SpecialCells(xlCellTypeLastCell).Row
Dim isHidden As Boolean
isHidden = Rows(1).Hidden
For i = 1 To n Step 2
Rows(i).Hidden = Not isHidden
Next i
End Sub

The i=1 is a variable, stand for the row which be hidden from, you can change it as you need.

2. Then click doc-multiply-calculation-3 button to run the code.

3. And all of the odd rows from first row have been hidden.


arrow blue right bubbleHide every other row with Kutools for Excel

Kutools for Excel: with more than 100 handy Excel add-ins, free to try with no limitation in 30 days. Get it Now.

With Kutools for Excel, you can hide every other row within two major steps: A: first select every other row with Select Interval Rows/Columns tool; B: Set them to hide. Do as follows:

1. Put the cursor at the row header and select the entire rows of the range that you want to hide.

2. Click Kutools > Select Tools > Select Interval Rows/Columns, and a Select Interval Rows/Columns dialog box will pop out. See screenshot:

doc-hide-every-other-row1

3. Then choose Rows from the Select option and enter the number 1 separately into the Interval of and Rows boxes.

4. And then click OK. All of the alternate rows have been selected.

5. Put the cursor at any row header which row has been highlighted, then right click, choose hide from the menu. And all of the alternate rows have been hidden. See screenshot:

doc-hide-every-other-row2

Related Articals:

How to select every other row or nth row in Excel?

How to delete every other row in Excel?

How to quickly copy every other row in Excel?


Kutools for Excel

More than 120 Advanced Functions for Excel 2013, 2010, 2007 and Office 365.

screen shot

btn read more     btn download     btn purchase