ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Show time stamp when a value is entered (https://www.excelbanter.com/excel-discussion-misc-queries/109141-show-time-stamp-when-value-entered.html)

TVCCBJB

Show time stamp when a value is entered
 
I use a scanner in my classroom to record attendance. Students highlight the
cell next to their name on a roster then scan their ID. It enters their ID
number in the cell. I would like the time the card was scanned to show up
instead. I played around with the If and Now formulas but could not get it to
work. I'm thinking of a macro that whenever any value is entered in the cell
it shows time instead. Any ideas?

Sandy

Show time stamp when a value is entered
 
Here the way using the IF and NOW() functions
Cells used A1 & B1 where A1 is the result of the scanner and B1 is your
formula.



=If(A1<0,Now(),"")
This will work if you don't mind having another column.

TVCCBJB wrote:
I use a scanner in my classroom to record attendance. Students highlight the
cell next to their name on a roster then scan their ID. It enters their ID
number in the cell. I would like the time the card was scanned to show up
instead. I played around with the If and Now formulas but could not get it to
work. I'm thinking of a macro that whenever any value is entered in the cell
it shows time instead. Any ideas?



Otto Moehrbach

Show time stamp when a value is entered
 
Perhaps something like this. This a sheet macro and must be placed in the
sheet module of your sheet. As written, this macro will change any entry
made in Column B, in any row greater than 1, to the current system time.
HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If IsEmpty(Target.Value) Then Exit Sub
If Target.Column = 2 And _
Target.Row 1 Then Target.Value = Time
End Sub

"TVCCBJB" wrote in message
...
I use a scanner in my classroom to record attendance. Students highlight
the
cell next to their name on a roster then scan their ID. It enters their ID
number in the cell. I would like the time the card was scanned to show up
instead. I played around with the If and Now formulas but could not get it
to
work. I'm thinking of a macro that whenever any value is entered in the
cell
it shows time instead. Any ideas?




stevebriz

Show time stamp when a value is entered
 
here is one idea

if thesstudents name is in columna Id numbers are entered in Col B and
you want date/time in Col C
add this macro to the worksheet thorugh the VBeditor

Private Sub Worksheet_Change(ByVal Target As Range)


If Target.Column = 2 Then Target.Offset(0, 1).Value = Date & " " & time

End Sub


TVCCBJB wrote:
I use a scanner in my classroom to record attendance. Students highlight the
cell next to their name on a roster then scan their ID. It enters their ID
number in the cell. I would like the time the card was scanned to show up
instead. I played around with the If and Now formulas but could not get it to
work. I'm thinking of a macro that whenever any value is entered in the cell
it shows time instead. Any ideas?



Gord Dibben

Show time stamp when a value is entered
 
This will update every time the sheet is re-calculated.

I believe OP wants a static time.

See Otto's post.


Gord Dibben MS Excel MVP

On 8 Sep 2006 12:43:24 -0700, "Sandy" wrote:

Here the way using the IF and NOW() functions
Cells used A1 & B1 where A1 is the result of the scanner and B1 is your
formula.



=If(A1<0,Now(),"")
This will work if you don't mind having another column.

TVCCBJB wrote:
I use a scanner in my classroom to record attendance. Students highlight the
cell next to their name on a roster then scan their ID. It enters their ID
number in the cell. I would like the time the card was scanned to show up
instead. I played around with the If and Now formulas but could not get it to
work. I'm thinking of a macro that whenever any value is entered in the cell
it shows time instead. Any ideas?




All times are GMT +1. The time now is 04:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com