hi
i want insert date automatically in column "C" when copy paste something in column "B"
hi
i want insert date automatically in column "C" when copy paste something in column "B"
You can do this with a macro. The following code should be placed in the module for the worksheet:
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Target.Column = 2 Then Cells(Target.Row, 3) = Date
End Sub
This code checks every time any cell on the sheet is changed (the only event that's suitable) to see if the changed cell (Target) is in column B. If it is, it changes the cell in the same row but in column C to the current date.
Going off the sample workbook
though if you want to use columns B & C![]()
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 3 Then Target.Offset(, 2) = Int(Now) End If End Sub
Hope this helpos![]()
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 2 Then Target.Offset(, 1) = Int(Now) End If End Sub
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks