これを自動的に行う唯一の方法は、VBAを使用して正しいタイプの検証を適用することだと思います。
次の例は、そのままでは立ち寄ることができませんが、何をする必要があるかについての手がかりが得られるはずです。このコードは、作業しているシートのワークシートコードモジュールに配置されます。
マクロレコーダを使用して、必要な検証を生成するためのコードを取得できます。
あなたが持っているあなたのコードと式であなたの質問を更新することができれば、私はあなたのニーズにこれをもう少し修正することができるかもしれません。
Private Sub Worksheet_Change(ByVal Target As Range)
' Target is a reference to the Cell(s) that have changed.
If Target.Address = "$A$1" Then
' We only care about this cell (CellA)
Select Case Target.Value
Case "needalist"
' remove any existing validation and add the list validation to $B$1 (CellB)
With Sheet1.Range("$B$1").Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="=$C$1:$C$7" ' Formula1 Can contain a formula
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Case "needanumber"
' remove any existing validation and add the number validation to $B$1 (CellB)
With Sheet1.Range("$B$1").Validation
.Delete
.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, Formula1:="1", Formula2:="10" ' Formula1 is min, Formula2 is max
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Case Else
' Catch Everything
Sheet1.Range("$B$1").Validation.Delete
End Select
End If
End Sub