hiding rows of data

mark gardner

Board Regular
Joined
Sep 6, 2006
Messages
52
I have a sheet where I have data in a row, followed by a calculation row, followed by a data row etc... (keeps alternating). I would like to know if there is a quick way to toggle those calcution rows off and on to hide them when I don't need them. I have to keep manually hiding the rows now.
 

Some videos you may like

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

daniels012

Well-known Member
Joined
Jan 13, 2005
Messages
5,219
You can create a button to do this, adding some code like this:
Range("3:3,5:5,7:7,9:9,11:11,13:13,15:15,17:17").Select
Selection.EntireRow.Hidden = True

Then one to unhide them all the same way

Michael
 

DRANDON

Active Member
Joined
Jun 30, 2006
Messages
268
assign macro to a button -

sub Hide_Rows()
dim i

for i = 20 to 2 step -2 ' starts at row 20 and ends at row 2
rows(i,i).select
Selection.EntireRow.Hidden = True
next i

end sub
 

Watch MrExcel Video

Forum statistics

Threads
1,123,321
Messages
5,600,948
Members
414,417
Latest member
Nobu

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top