ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   hiding even (or odd) rows in excel 2003 (https://www.excelbanter.com/excel-discussion-misc-queries/128946-hiding-even-odd-rows-excel-2003-a.html)

9d1awd

hiding even (or odd) rows in excel 2003
 
I am curious as how to hide even , or odd rows in 2003 , not based on
information in them but the actual row numbers themselves.

Jason

Gary''s Student

hiding even (or odd) rows in excel 2003
 
easy with a little macro:


Sub hide_um()
Application.ScreenUpdating = False
For i = 2 To 65536 Step 2
Rows(i).EntireRow.Hidden = True
Next
Application.ScreenUpdating = True
End Sub

--
Gary''s Student
gsnu200703


"9d1awd" wrote:

I am curious as how to hide even , or odd rows in 2003 , not based on
information in them but the actual row numbers themselves.

Jason


Roger Govier

hiding even (or odd) rows in excel 2003
 
Hi Jason

One way
In a spare column enter following formula
=MOD(ROW(),2)=0
Copy down as far as required.
Highlight first cell, DataFilterAutofilterselect from dropdown TRUE
--
Regards

Roger Govier


"9d1awd" wrote in message
...
I am curious as how to hide even , or odd rows in 2003 , not based on
information in them but the actual row numbers themselves.

Jason




Bernie Deitrick

hiding even (or odd) rows in excel 2003
 
Jason,

Two ways:

Manually. Hide row 1 (or row 2). Then press F5 and enter 1:2. Press Ctrl-C, then select rows 3
through your last even numbered row that you want to hide, and press Ctrl-V.

Through Filters. Enter the formula

=MOD(ROW(),2)

into a column, through all the rows of interest. Then apply autofilters, and choose to show either
1 or 0 in that column.

HTH,
Bernie
MS Excel MVP


"9d1awd" wrote in message
...
I am curious as how to hide even , or odd rows in 2003 , not based on
information in them but the actual row numbers themselves.

Jason




Bernie Deitrick

hiding even (or odd) rows in excel 2003
 
And, for completeness, you could use a macro: Select the range of rows, and run this
Sub HideRows()
Dim myRow As Range
Dim HideEven As Boolean
HideEven = MsgBox("Hide Even rows?", vbYesNo) = vbYes
For Each myRow In Selection.Rows
myRow.Hidden = False
If HideEven And myRow.Row Mod 2 = 0 Then myRow.Hidden = True
If Not HideEven And myRow.Row Mod 2 = 1 Then myRow.Hidden = True
Next myRow

End Sub



--
HTH,
Bernie
MS Excel MVP


"9d1awd" wrote in message
...
I am curious as how to hide even , or odd rows in 2003 , not based on
information in them but the actual row numbers themselves.

Jason




9d1awd

hiding even (or odd) rows in excel 2003
 
thank you to all of you for the help , i got it working , the help was much
appreciated :)

Jason

"9d1awd" wrote:

I am curious as how to hide even , or odd rows in 2003 , not based on
information in them but the actual row numbers themselves.

Jason



All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com