macro to unhide

jzkemler1

New Member
Joined
Jan 4, 2012
Messages
13
Hi!!
I have a spreadsheet that has rows 10-500 hidden. I am trying to create a macro that when run will unhide 10 rows at a time. So when it is run the first time rows 10-20 will be visable, then when run a second time rows 21-30 will be visable and so on. Can anyone help with how this code would look?

Thank you thank you so much from a newbie!!

Zoe
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.
10-20 is eleven rows. 21-30 is ten. do you want ten at a time or 11 at a time?
 
Upvote 0
Check out the data tab and the option called group. It groups rows or columns(however many you want) together and they can be toggled to hide/unhide by pressing a button.

You can even group inside of groups to expand and shrink what you are viewing quickly. A very powerful tool if used properly.
 
Upvote 0
Code:
Sub mySub()
    With ActiveSheet.Cells.SpecialCells(xlCellTypeVisible).Areas(1)
        .Rows(.Rows.Count).Offset(1, 0).Resize(10, 1).EntireRow.Hidden = False
    End With
End Sub
 
Upvote 0
Thank you murrayty, I will definately look into the grouping function, I have never used it before and it sounds like something I can use in the future.

@mikerickson that was exactly what I needed. I am so impressed and thankful for the skill that is on this board. You have helped me out so much. Thank you:)

Zoe
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

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
Back
Top