0

选择单元格后,我想为该行加上时间戳并将其移动到另一张纸上?

Private Sub Worksheet_Change
On Error GoTo Handler
If Target.Column = 11 And Target.Value = "COMPLETE" Then
Application.EnableEvents = False
Target.Offset(0, 2) = Format(Now(), "mm-dd-yyyy hh:mm")
Application.EnableEvents = True
End If
Handler:


If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Columns(11)) Is Nothing Then
    If UCase(Target.Value) = "COMPLETE" Then
        Range("A" & Target.Row).Resize(1, 13).Copy Sheets("Closed Request").Cells(Rows.Count, 1).End(xlUp)(2)
        Target.EntireRow.Delete
    End If
End If


End Sub
4

0 回答 0