I have attached an example program. Just a note where it says Formula1:="=CHOOSE(MATCH(A2,Categories,0),Column1,Column2)" the A2 should read the target.value which is A2. When the program runs it should look at the value in Column A within the same row. Example if A15 has a value the formula would read Formula1:="=CHOOSE(MATCH(15,Categories,0),Column1,Column2)"
Program is also here to.
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Target, Range("A2:A500")) Is Nothing Then
Call ColumnG(Intersect(Target, Range("A2:A500")))
End If
End Sub
Sub ColumnG(Target As Range)
With Target.Offset(0, 1).Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=CHOOSE(MATCH(A2,Categories,0),Column1,Column2)"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = "Cell Validated"
.InputMessage = ""
.ErrorMessage = "Cell validated.Select from dropdown list."
.ShowInput = True
.ShowError = True
End With
End Sub
Bookmarks