Zelle D7 in einer Messagebox wiedergegeben werden ( z.B "Alles Gute"+ "D7" )
Gruß Matthias
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
Dim Bereich As Range
Set Bereich = Range("A2:A5,C2:C5")
If Not Intersect(Target, Bereich) Is Nothing Then
If CheckNurZahlen(Bereich) Then MsgBox "Alles Gute " & Range("D7")
End If
End Sub
Private Function CheckNurZahlen(rng As Range) As Boolean
Dim Zelle As Range
For Each Zelle In rng
If Zelle = "" Or Not IsNumeric(Zelle) Then Exit Function
If Zelle = 0 Then Exit Function
Next Zelle
CheckNurZahlen = True
End Function