+ Reply to Thread
Results 1 to 3 of 3

Conditional Drop Down?

Hybrid View

heatwave Conditional Drop Down? 10-25-2010, 11:43 PM
pr4t3ek Re: Conditional Drop Down? 10-26-2010, 12:55 AM
DonkeyOte Re: Conditional Drop Down? 10-26-2010, 02:59 AM
  1. #1
    Registered User
    Join Date
    08-08-2005
    Posts
    76

    Conditional Drop Down?

    Is it possible to have a conditional drop down where for example, there are 3 categories of products and each category has 3 different items?

    Selecting one of the category will restrict a drop down selection to its 3 items only.

    More explanation in example.xls attached.
    Attached Files Attached Files

  2. #2
    Forum Contributor pr4t3ek's Avatar
    Join Date
    10-13-2008
    Location
    Melbourne, Australia
    MS-Off Ver
    2003 & 2007, 2010
    Posts
    483

    Re: Conditional Drop Down?

    this is incomplete..
    try it..

    Sub Macro1()
        If Range("c3").Value = "Fruits" Then
        doit ("Peaches, test")
        End If
    End Sub
    Private Sub doit(values As String)
        Range("C3").Select
        With Selection.Validation
            .Delete
            .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:=values
            .IgnoreBlank = True
            .InCellDropdown = True
            .InputTitle = ""
            .ErrorTitle = ""
            .InputMessage = ""
            .ErrorMessage = ""
            .ShowInput = True
            .ShowError = True
        End With
    End Sub
    --
    Regards
    PD

    ----- Don't Forget -----

    1. Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks

    2. Thank those who have helped you by Clicking the scales above each post.

    3. Please mark your post [SOLVED] if it has been answered satisfactorily.

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Conditional Drop Down?

    @heatwave see: http://www.contextures.com/xlDataVal02.html re: dependent data validation

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1