How can I change the row rCell2.Value = Date - Day(Date) to return the end of the previous month if there is no data in the cell?
Right now, the code works as planned in all cases but returns a blank if the cell is blank.
Dim rCell2 As Range
For Each rCell2 In Selection
If IsDate(rCell2) And Not rCell2.HasFormula Then
rCell2.Value = Date - Day(Date)
thank you very much