am = 2
imo = 10
imu = 0
a_C10 = Sheets(
"Tabelle1"
).Range(
"C10"
).Value
a_C11 = Sheets(
"Tabelle1"
).Range(
"C11"
).ValueIf a_C10 >= b
Then
b = UserForm1.txt_3.Value
If
a_C10 >= b
Then
MsgBox (
"Der Wert in der Tabelle ist größer oder gleich"
)
ElseIf
txt_1.Value - am < 0.5
And
txt_1.Value + am > 0.5
And
txt_2.Value - imo < 0.5
And
txt_2.Value + imu > 0.5
Then
Sheets(
"Tabelle1"
).Range(
"C10"
).Value = txt_3.Value
MsgBox (
"Der Wert in C10 wurde geändert"
)
End
If
If
a_C11 >= b
Then
MsgBox (
"Der Wert in der Tabelle ist größer oder gleich"
)
ElseIf
txt_1.Value - am < 0.5
And
txt_1.Value + am > 0.5
And
txt_2.Value - imo < 1.5
And
txt_2.Value + imu > 1.5
Then
Sheets(
"Tabelle1"
).Range(
"C11"
).Value = txt_3.Value
MsgBox (
"Der Wert in C11 wurde geändert"
)
End
If