Drop Down Lists

G

Guest

Hello,

I am trying to create drop down lists that will, when N/A is chosen as the
option, it will hide/remove that section in my form. It will be done to
shorten the amount of printing by reducing the number of cells at apply to
that drop down list. I don't know if drop down lists are capable of doing
this in Excel 2003/Word 2003 or if drop down list is the correct term for
this type of action. Please Help. Brandon
 
O

Otto Moehrbach

Brandon
You're right that a Data Validation cell does not have that
functionality. But there is a way. Use a Worksheet_Change macro. Something
like this:
Private Sub Worksheet_Change(ByVal Target As Range)
If IsEmpty(Target.Value) Then Exit Sub
If Intersect(Target, Range("F5")) Is Nothing Then Exit Sub
If Target.Value = "N/A" Then _
Range("6:7").EntireRow.Hidden = True
End If
End Sub
This macro will hide rows 6 and 7 if the value in F5 is "N/A". Is this what
you want?
This macro must be placed in the sheet module of the sheet in question. To
access that module, right-click the sheet name, select View Code. Paste
this macro into that module. HTH Otto
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top