Help with code please
Gary,
Add check for valid date:
If IsDate(wEndval) Then
' this puts the day in the cell if it's a weekend
If Weekday(wEndval, 2) 5 Then
cell.Value = Format(wEndval, "ddd")
cell.HorizontalAlignment = xlCenter
cell.Font.Bold = True
End If
End If
HTH
|