Results 1 to 3 of 3

Create dependent dropdown lists

Threaded View

  1. #1
    Registered User
    Join Date
    03-29-2017
    Location
    Madrid
    MS-Off Ver
    2013
    Posts
    38

    Create dependent dropdown lists

    Hi everyone, I'd like to make a list at column D of the example image I've attached. Let's say for example D39. As you can see, some cells in the same row on the right side have values whilst others have empty outcome. I'd like it to make a list that, whenever there is a value, it creates a list with the top text, so for example D39, the list should say "Aproximación" and "PAPI". The range of the list goes from column E to BA and there are like 10 thousand rows, so its quite a lot of data.

    In case it's possible, it would be great if the list could give only values which are greater than 0, smaller than 0 BUT greater than a given value on a cell (B2 for example) or no list in case the whole row is empty. I guess it's not very easy and hope I explained myself clearly, thanks!

    Jindon was kind enough to try to help me but for some reason it doesnt seem to work for me, the code is the following,

    Option Explicit
    
    Private Sub Worksheet_Change(ByVal Target As Range)
        Dim r As Range, x, flg As Boolean
        If Intersect(Target, Columns("e:ba")) Is Nothing Then Exit Sub
        Application.EnableEvents = False
            If Not [isref(mylist!a1)] Then
            With Sheets.Add
                .Name = "MyList": .Visible = 2
            End With
        End If
        For Each r In Intersect(Target, Columns("e:ba"))
            If r.Row > 6 Then
                With r.EntireRow.Range("d1").Validation
                    .Delete: flg = False
                    x = Filter(Evaluate("if(e" & r.Row & ":ba" & r.Row & "<>"""",e6:ba6)"), False, 0)
                    If UBound(x) > -1 Then
                        With Sheets("mylist").Rows(r.Row)
                            .Clear
                            With .Cells(r.Row, 1).Resize(, UBound(x) + 1)
                                .Value = x
                                .Name = "mylist_" & r.Row: flg = True
                            End With
                        End With
                    End If
                    If flg Then .Add Type:=3, Operator:=xlEqual, Formula1:="=mylist_" & r.Row
                End With
            End If
        Next
        Application.EnableEvents = True
    End Sub
    https://www.excelforum.com/excel-pro...nk-or-not.html
    Attached Images Attached Images

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] How can I create dependent & dynamic DropDown lists that start with a certain string?
    By mcclausky in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-17-2016, 01:44 PM
  2. [SOLVED] Dependent dropdown lists.
    By misi06 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 08-08-2016, 07:21 AM
  3. duplicate & dependent dropdown lists
    By LPSBrar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-19-2015, 01:29 AM
  4. [SOLVED] Dependent dropdown lists
    By ibenegal in forum Excel General
    Replies: 6
    Last Post: 01-07-2015, 10:00 AM
  5. [SOLVED] Dependent Dropdown Validation Lists
    By Root River Hardwoods in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-01-2014, 05:30 PM
  6. Excel 2007 : Dependent DropDown lists
    By Harrison in forum Excel General
    Replies: 2
    Last Post: 07-12-2010, 06:32 PM
  7. [SOLVED] Dependent dropdown lists
    By Axel in forum Excel General
    Replies: 1
    Last Post: 05-18-2006, 11:35 AM

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