|
猛虎襲来さん、こんにちは。
こんなんでどうですか?。該当シートモジュールにコピペして、お試し下さい。
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 Then
If Target.Value = "高" Then
With Cells(Target.Row, 5)
.NumberFormatLocal = "0_ "
.Validation.Add Type:=xlValidateWholeNumber, AlertStyle:=xlValidAlertStop, _
Operator:=xlBetween, Formula1:="0", Formula2:="250"
End With
ElseIf Target.Value = "障" Then
With Cells(Target.Row, 5)
.Validation.Delete
.NumberFormatLocal = "0.00_ "
End With
ElseIf Target.Value = "万" Then
With Cells(Target.Row, 5)
.Validation.Delete
.NumberFormatLocal = "@"
End With
End If
End If
End Sub
|
|