Unhiding Row from a range of hidden rows

wenxi

New Member
Joined
Apr 28, 2006
Messages
21
Hi

Let's say that i have Row 1-10 hidden and i want to unhide row 5 while keeping the rest hidden. Any faster method to achive this instead of unhidding 1-10 then hide 1-4 and 6-10 again.
 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Should be able to do the following syntax
Code:
ActiveSheet.Rows(5).EntireRow.Hidden = False
 
Upvote 0
Give this macro a try...
Code:
Sub UnhideRow()
  Dim RowNum As String
  RowNum = InputBox("What row number do you want to unhide?")
  If Len(RowNum) = 0 Then
    ' Nothing was entered... do nothing
  ElseIf RowNum Like "*[!0-9]*" Or RowNum = "0" Then
    MsgBox "Invalid row number!", vbCritical
  Else
    Rows(RowNum).Hidden = False
  End If
End Sub
 
Upvote 0
Give this macro a try...
Code:
Sub UnhideRow()
  Dim RowNum As String
  RowNum = InputBox("What row number do you want to unhide?")
  If Len(RowNum) = 0 Then
    ' Nothing was entered... do nothing
  ElseIf RowNum Like "*[!0-9]*" Or RowNum = "0" Then
    MsgBox "Invalid row number!", vbCritical
  Else
    Rows(RowNum).Hidden = False
  End If
End Sub

Hi RICK,

It works.
THANKS ALOT. :)
 
Upvote 0

Forum statistics

Threads
1,224,506
Messages
6,179,158
Members
452,892
Latest member
yadavagiri

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