Sub narozeniny()
Dim rng As Range
Dim radek As Long
Dim datum As String
Dim i As Long
Dim a As String
datum = Format(Date, "dd.mm.")
With ActiveSheet
radek = .Cells(.Rows.Count, "B").End(xlUp).Row
End With
Set rng = Range("B2:B" & radek)
For i = 1 To radek
a = Format(Range("B" & i + 1).Value, "dd.mm.")
If a = datum Then
MsgBox ("Dnes má narozeniny: " & Range("A" & i + 1).Value)
End If
Next i
End Subcitovat