I have an excel sheet, which calculates me the current Sunday inside the cell.
I use macros to manipulate the data inside the sheets. But I can't read out the date and convert it to a string.
Run-time error '13': Type mismatch. On the line sDate =
Sub Dateit()
Dim sDate As String
'Formula inside cell Q5: =Today()
'Formula inside merged cells Q6:R6: =INT((Q5-1)/7)*7+1
'Shows the String: 5-Nov-2017 in cells q6:r6
sDate = Format(Range("Q6:R6").Value, "dd. mmm yyyy")
MsgBox sDate
End Sub