我想寻求帮助。我的宏即将将当前日期填充到所有填充的行。一开始它似乎工作,突然它开始将标题更改(覆盖)为当前日期并将当前日期放在下面的 1 个单元格中。谁能帮助我我应该修改什么以使其正常工作?
这是宏代码(重新格式化):
Sub DateVerified()
Sheets("Data").Activate
Dim rngAddress As Range
Set rngAddress = Range("A1:ZZ1").Find("Verified Date").Offset(1, 0)
rngAddress.Select
Dim ac As Integer
Dim lastr As Long
Dim sh As Worksheet
Set sh = ActiveSheet
ac = ActiveCell.Column
lastr = sh.Cells(Rows.Count, ac).End(xlUp).Row
Range(Cells(2, ac), Cells(lastr, ac)).Select
Selection.ClearContents
Selection.Formula = "=TEXT(Now(),""dd/mm/yyyy"")"
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub