Private Sub CommandButton1_Click()
Dim lr As Long
Dim sr As Long
Dim r As Long
Application.ScreenUpdating = False
' Find last row with data in column D
lr = Cells(Rows.Count, "D").End(xlUp).Row
' Find last populated cell in column E and start on row below that
sr = Cells(Rows.Count, "E").End(xlUp).Row + 1
' Populate columns E and F with formulas, from row 2 to last row
Range("E" & sr & ":E" & lr).FormulaR1C1 = "=IF(R[]C[-1]<>"""",R[]C[-1]+21,"""")"
Range("F" & sr & ":F" & lr).FormulaR1C1 = "=IF(R[]C[-1]<>"""",R[]C[-1]-TODAY(),"""")"
Columns("E:E").NumberFormat = "mm/dd/yy"
' Convert formulas to hard-coded values
Range("E" & sr & ":E" & lr).Value = Range("E" & sr & ":E" & lr).Value
Range("F" & sr & ":F" & lr).Value = Range("F" & sr & ":F" & lr).Value
Application.ScreenUpdating = True
' clear contents if comment is made
For r = sr To lr
If Cells(r, "G") <> "" Then Cells(r, "F").ClearContents
Next r
End Sub