tazz
Member
Hello all,
Since this post was started a couple of day ago in the old forum I decided to bring it back in this one.
This code(thanks to coolkiran) is inserting computer's time in all cells belonging to column C for the same IDnumber as in Col A. I would like to change this code to insert computer's time only in one cell near the cell in col B with the most recent time for the same IDnumber as in col A.
To be more specific :
-col A is IDnumber, col B is Time IN and col C is Time Out
-TextBox1 is used for inserting IDnumber in the spread sheet.
Sheets("Yoursheetname").Activate
'Dim rw As Long 'next available row
Cells(Rows.Count, "A").Select
Selection.End(xlUp).Select
BotRow = Selection.Row
For rw = 1 To BotRow
If Cells(rw, "A").Value = TextBox1.Text Then 'Personal Id textbox
Cells(rw, "c").Value = Now()
End If
Next
Thank you for your help.
Since this post was started a couple of day ago in the old forum I decided to bring it back in this one.
This code(thanks to coolkiran) is inserting computer's time in all cells belonging to column C for the same IDnumber as in Col A. I would like to change this code to insert computer's time only in one cell near the cell in col B with the most recent time for the same IDnumber as in col A.
To be more specific :
-col A is IDnumber, col B is Time IN and col C is Time Out
-TextBox1 is used for inserting IDnumber in the spread sheet.
Sheets("Yoursheetname").Activate
'Dim rw As Long 'next available row
Cells(Rows.Count, "A").Select
Selection.End(xlUp).Select
BotRow = Selection.Row
For rw = 1 To BotRow
If Cells(rw, "A").Value = TextBox1.Text Then 'Personal Id textbox
Cells(rw, "c").Value = Now()
End If
Next
Thank you for your help.