I think i figured out a way to do what i wanted.
Thanks for your kind commends btw.
Below is the code that i got to work. But for it to work i had to first take the birthdate and devide it up into three cells, day, month and year.
then i again combine day and month but not the year, instead i used the year(now()) and got the birthdate this year.
then i could use below code to add 1-10 days with dateadd.
this feels a bit clumsy... but so far i think it will work.
Sub checkearlybirthday()
Dim ans As String
Dim cell As Range
For Each cell In Sheets("Personal").Range("rf10:rf500")
If cell = DateAdd("d", 1, Date) Or cell = DateAdd("d", 2, Date) Or cell = DateAdd("d", 3, Date) Or cell = DateAdd("d", 4, Date) Or cell = DateAdd("d", 5, Date) Or cell = DateAdd("d", 6, Date) Or cell = DateAdd("d", 7, Date) Or cell = DateAdd("d", 8, Date) Or cell = DateAdd("d", 9, Date) Or cell = DateAdd("d", 10, Date) Then
ans = ans & vbNewLine & Sheets("Personal").Cells(cell.Row, 2).Value
End If
Next
If Len(ans) < 1 Then
Else
MsgBox "Hallå! " & vbNewLine & "Det är 10 dagar eller mindre till dessa fyller år. " & ans & " " & vbNewLine & ""
End If
End Sub