how to hide with conditional formatting

alan myers

Board Regular
Joined
Oct 31, 2017
Messages
119
Office Version
  1. 365
Platform
  1. Windows
how can i hide a row if say d5 = 0
then check d6 if 0 hide that row and so on
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
Can't do it with CF, you will need to use VBA.
Do you want to do that ?
 
Upvote 0
Try this
VBA Code:
Sub MM1()
Dim lr As Long, r As Long
lr = Cells(Rows.Count, "D").End(xlUp).Row
For r = lr To 2 Step -1
If Cells(r, "D").Value = 0 Then
    Rows(r).Hidden = True
End If
Next r
End Sub
 
Upvote 0
is there a way lets say d6 has a 1 than i change it to 0 would like it to change automatic is that liike a change event
?
 
Upvote 0
is there a way lets say d6 has a 1 than i change it to 0 would like it to change automatic is that liike a change event
I am a little confused on what you are trying to accomplish here.
If we change 1 in D6 to a 0, does that mean that we then hide that row too?
So in essence, we would be hiding all rows in column D where the value is EITHER 0 or 1?

And when should this "automated" change take place, when a value is entered into column D?

It might be more beneficial with us, if you just explain the big picture (what you are ultimately trying to accomplish).
Most important to us, is:
1. What is the full, exact rule?
2. What range should it apply too?
3. When it should be run?
4. How it should be run (manually or automatically)?
 
Upvote 0
File sharing and storage made simple

ok have a list of product in data sheet qrantity is row e have same sheet called main
now on main sheet nothing should be showing at start and data sheet should have all row e cells = 0
now when i add a product the 0 will change to what ever i buy say 6 when i enter i want the main sheet to show that product
so main should show

row 27 2 x 6 Ground Contact AC2® Green Pressure Treated Lumbertreated 2x6x6'$5.896$35.34Band & Joisttreated2x6Menards







 
Upvote 0
and when product number changes to 0 i want it to hide that row automatically
 
Upvote 0
but i dont want to have to run code i just want it to run when vaLUE CHANGES
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

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