|
まつさん、こんにちは。
1列にすれば、こんなんでいけると思います。各リストを空きエリア(AA1〜)に1列リンク(計4列)させてみました。どうですぅ?
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "A1" Then
With Range("B1").Validation
.Delete
If Target.Value = 1 Then
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$AA$1:$AA$20"
ElseIf Target.Value = 2 Then
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$AB$1:$AB$20"
ElseIf Target.Value = 3 Then
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$AC$1:$AC$20"
ElseIf Target.Value = 4 Then
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$AD$1:$AD$20"
End If
End With
End If
End Sub
|
|