IFS statement with Data Validation

chasechap

New Member
Joined
May 20, 2019
Messages
1
Hello,
I am trying to make an ifs statement that works with data validation.
I want it to be
IFS(A1="Location1","Fred",A1="Location2","Mike",A1="Location3", *drop down of 3 names*)
(If A1= Location 1 then A2 autopopulates to Fred, same with location 2 and Mike, Location 3 I want a drop down of 3 names in A2)

Any ideas on how it would be able to work?
Thanks!
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
Data Validation doesn't auto-populate, it just checks that the input is valid, or provides a list to select from.
 
Upvote 0
You'll need to use VBA for this I think, try this worksheet code:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
On Error Resume Next
    Range("A2").Validation.Delete
    If Range("A1").Value = "Location1" Then
        Range("A2").Value = "Fred"
    ElseIf Range("A1").Value = "Location2" Then
        Range("A2").Value = "Mike"
    ElseIf Range("A1").Value = "Location3" Then
    With Range("A2").Validation
        .Delete
        .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
        xlBetween, Formula1:="=nameList"
        .IgnoreBlank = True
        .InCellDropdown = True
        .ShowInput = True
        .ShowError = True
    End With
    End If
End Sub

Where nameList is a named range containing the 3 names for the drop down.
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,871
Members
452,363
Latest member
merico17

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