• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Hide Rows based on Dropdown Value

BSmith

New Member
I need help hiding rows based on the value of a dropdown. The dropdown is located in C1. When it displays "OE", I would like Rows 52:54 to remain visible on the sheet. When it shows anything other than "OE", I would like Rows 52:54 to be hidden. I would prefer this to be done based on when the dropdown value is changed (no macros).
 
You can't "hide rows" without using a macro

You could use Conditional Formatting to hide the values in the rows ie: make the rows text white on a white background
 
I'm okay using VBA. Maybe I misspoke about macros. I just don't want the user to have to click anything or run any macros to get the rows hidden or object hidden.
 
I have a shape that i want to hide if the value is not "OE". Is there a way to do this?
You want to hide a shape by hiding rows 52:54? You can hide the shape without hiding the rows. Do you want to hide rows or shape (or both)?
 
I want to hide the shape. Ideally I would like to hide the rows as well to condense the space, but that is not essential.
 
Code:
Sub shapevisibility()
Dim ws As Worksheet
Dim sp As Shape
Set ws = ActiveSheet
For Each sp In ws.Shapes
If sp.Name Like "Rounded Rectangle*" Then
sp.Visible = Not sp.Visible
End If
Next
End Sub
 
Back
Top