Conditional searchable dropdown list

nihad

New Member
Joined
Feb 24, 2021
Messages
40
Office Version
  1. 365
Platform
  1. Windows
Hi all

I have 2 searchable dropdown list on column B and C I'm using Filter Function
Excel Formula:
=TRANSPOSE(SORT(UNIQUE(FILTER(LocationList[Name],ISNUMBER(SEARCH('Adj Sheet'!B5,LocationList[Name],1)),"location not found"))))

Is there away to add a condition to the C dropdown list to not show any value unless a value from dropdown B is selection?

Kind regards

Adjustment Sheet.xlsx
ABC
4LineTo LocationCategory
51foodFood Purchases 5000
Adj Sheet
Cells with Data Validation
CellAllowCriteria
B5:B66List='To Loc'!E2#
C5:C66List='To Nom'!E2#
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
this may help you out

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("B5:B66")) Is Nothing Then
        If Target.Value <> "" Then
            'Dropdown and error message on cells 2 and 3 columns left of "Make a selection" will be enabled
            With Cells(Target.Row, Target.Column + 1).Validation
                .InCellDropdown = True
                .ShowError = True
            End With
        Else
             With Cells(Target.Row, Target.Column + 1).Validation
                .InCellDropdown = False
                .ShowError = False
            End With
        End If
    End If
End Sub
 
Upvote 0
this may help you out

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("B5:B66")) Is Nothing Then
        If Target.Value <> "" Then
            'Dropdown and error message on cells 2 and 3 columns left of "Make a selection" will be enabled
            With Cells(Target.Row, Target.Column + 1).Validation
                .InCellDropdown = True
                .ShowError = True
            End With
        Else
             With Cells(Target.Row, Target.Column + 1).Validation
                .InCellDropdown = False
                .ShowError = False
            End With
        End If
    End If
End Sub

Hi Thanks for this, Is it possible to do it without VBA?
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,850
Members
449,051
Latest member
excelquestion515

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
Back
Top