Date stamping entries

  • Thread starter Thread starter Dino
  • Start date Start date
D

Dino

I hope that someone can help me with this:

I am setting up a 20,000 item spreadsheet, where my staff
will put an "X" in an adjacent column when they are done
with researching each item.

I want to be able to record and capture the date that they
input the "X" without requiring them to enter the actual
date. I would like Excel to capture this information so
that I can tally the production automatically by date on a
separate page in the workbook. Can this be done?

Thanks, if anyone can help.
Dino
 
right click on sheet tab>view code>insert this>save
Now if you are at row 5 or more and in column 2 the macro will fire

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 2 And Target.Row < 5 Then Exit Sub
If UCase(Target) = "X" Then MsgBox Date
End Sub

Now you can modify to put the info on a separate sheet. More info?
 
Dino

Right-click on the sheet tab and select "View Code".

Copy/paste this code in there.

When you place an "X" or "x" in Column B the hard-coded date stamp will appear
in Column C.

Option Compare Text
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
'when entering data in a cell in Col B
On Error GoTo enditall
If Target.Cells.Column = 2 Then
n = Target.Row
If Excel.Range("B" & n).Value = "x" Then
Excel.Range("C" & n).Value = Now
End If
End If
enditall:
End Sub

Gord Dibben XL2002
 
Back
Top