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

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney

Joe Was

MrExcel MVP
Joined
Feb 19, 2002
Messages
7,539
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
 

JHSam

Board Regular
Joined
Feb 17, 2002
Messages
62
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
 

Forum statistics

Threads
1,143,704
Messages
5,720,378
Members
422,281
Latest member
jantoooh

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