ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   formula to show time that data was entered on spreadsheet (https://www.excelbanter.com/excel-worksheet-functions/246073-formula-show-time-data-entered-spreadsheet.html)

Irmatwit

formula to show time that data was entered on spreadsheet
 
I want to know if its possible for the time to automatically appear in a
seperate cell when data is entered in a cell. For example, in cell A1 i
enter the figure 3, in cell A2 the time i entered that number appears as
hh.mm.ss. In cell B1 i enter the figure 4 & in cell B2 the time appears
again in hh.mm.ss.

Is this possible and how do i achieve it please. Thank you in advance

Mike H

formula to show time that data was entered on spreadsheet
 
Hi,

You need a macro for that but it's easy. Right click your sheet tab, view
code and paste the code below in on the right and that's it. Close VB editor

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("1:1")) Is Nothing Then
On Error Resume Next
Application.EnableEvents = False
Target.Offset(1) = Format(Time, "hh:mm:ss")
Application.EnableEvents = True
On Error GoTo 0
End If
End Sub


Mike

"Irmatwit" wrote:

I want to know if its possible for the time to automatically appear in a
seperate cell when data is entered in a cell. For example, in cell A1 i
enter the figure 3, in cell A2 the time i entered that number appears as
hh.mm.ss. In cell B1 i enter the figure 4 & in cell B2 the time appears
again in hh.mm.ss.

Is this possible and how do i achieve it please. Thank you in advance



All times are GMT +1. The time now is 09:53 PM.

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