Hiding Rows Automatically

gbwcf

New Member
Joined
Oct 16, 2002
Messages
6
I'm trying to set up a worksheet so that
if a specific cell = "", then
the entire row is hidden.

Any ideas?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
You can also convert this to an "Event" code so it will run automaticall when any re-calculation or new selection is made. The problem with this is if yoy change the code below to work with "Blanks" ("") rather than "0." Then you will hide all blank rows and your sheet will be difficult to manage, so the manual code below is better, just change the "0" to "". JSW

Sub MyHide()
'This "Hides" any Row in Column(A) that =0, rows: 1 through 10.
'By J.S. Was, 6-12-2001.
Dim i
For i = 1 To 10
With Intersect(Columns(1), ActiveSheet.UsedRange)
Rows(i).Select
If .Rows(i).Value = 0 Then
Selection.EntireRow.Hidden = True
End If
End With
Next
End Sub
 
Upvote 0
I recently posted the same question and got received some useful replies ... search on my User name (JHSam) for the relevant post and reply.

JS
 
Upvote 0

Forum statistics

Threads
1,214,632
Messages
6,120,649
Members
448,975
Latest member
sweeberry

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