auto hide/unhide??

megaman666

Board Regular
Joined
Jul 26, 2012
Messages
92
Hi, im creating a form for people to complete in excel. I need to have a 'full' and 'simplified' version of the form.. The default view would be the simplified version, which would include some rows of superfluous data to be hidden. One of the fields will be a drop down list with 'yes/no' options- is there a way to unhide the additional fields if 'yes' is selected and to have them hidden if 'no' or (no value) is chosen?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.

megaman666

Board Regular
Joined
Jul 26, 2012
Messages
92
ok, so using the following code I can 'almost' get this to work.....

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 5 And Target.Row = 15 And Target.Value = "None" Then
Application.Rows("16:21").Select
Application.Selection.EntireRow.Hidden = False
Else
Application.Rows("16:21").Select
Application.Selection.EntireRow.Hidden = True
End If
End Sub


Problem I have now, If you select 'none' the rows unhide, which is great.. but then if you populate one of the fields (say, in row 16) then it hides again, even tho 5:15 still = 'None'?

Any help would be trully appreciated.
 
Upvote 0

Forum statistics

Threads
1,195,632
Messages
6,010,807
Members
441,569
Latest member
PeggyLee

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