I woul开发者_StackOverflow中文版d like a macro that puts today's date into all blank cells within a column. If there is a date already in then a cell, then it should skip this row.
You can do this without VBA, see http://www.contextures.com/xlDataEntry02.html
With code as requested (select your range to populate prior to running)
Sub QuickFill()
Dim rng1 As Range
On Error Resume Next
Set rng1 = Selection.SpecialCells(xlBlanks)
On Error GoTo 0
If Not rng1 Is Nothing Then rng1.Value = Format(Now(), "dd-mmm-yy")
End Sub
精彩评论