ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   DATE & TIME OF DAY APPEAR AUTOMATICALLY IN CELL (https://www.excelbanter.com/excel-discussion-misc-queries/112702-date-time-day-appear-automatically-cell.html)

JKLONEEAGLE

DATE & TIME OF DAY APPEAR AUTOMATICALLY IN CELL
 
I WOULD LIKE THE TIME OF DAY & THE DATE TO APPEAR IN CELL A-1 AUTOMATICALLY
WHEN I POPULATE CELL A-2 WITH ANYTHING NUMBERS OR TEXT. CAN THIS BE DONE IN
EXCELL?
YOUR HELP WILL BE MUCH APPRECIATED. THANKS

Otto Moehrbach

DATE & TIME OF DAY APPEAR AUTOMATICALLY IN CELL
 
I gather that you want this date and time to be fixed and not volatile. The
following macro will do that. Note that this macro is a sheet macro and must
be placed in the sheet module of your sheet. To do that, right-click on the
sheet tab, select View Code, and paste this macro into that module. "X" out
of that module to return to your sheet. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Address(0, 0) = "A2" Then
If IsEmpty(Target.Value) Then
Exit Sub
Else
Range("A1").Value = Now
End If
End If
End Sub
"JKLONEEAGLE" wrote in message
...
I WOULD LIKE THE TIME OF DAY & THE DATE TO APPEAR IN CELL A-1 AUTOMATICALLY
WHEN I POPULATE CELL A-2 WITH ANYTHING NUMBERS OR TEXT. CAN THIS BE DONE
IN
EXCELL?
YOUR HELP WILL BE MUCH APPRECIATED. THANKS




JKLONEEAGLE

DATE & TIME OF DAY APPEAR AUTOMATICALLY IN CELL
 
THANKS OTTO, THAT MACRO DID WORK. THE PROBLEM IS I STATED MY QUESTION WRONG,
SORRY. I WOULD LIKE THE TIME OF DAY AM/PM & THE DATE TO APPEAR IN COLUMN (A)
CELLS A-1 THRU CELLS A-36 AUTOMATICALLY WHEN I POPULATE COLUMN (B) CELLS B-1
THRU B-36 WITH ANYTHING NUMBERS OR TEXT. THESE CELLS WOULD BE POPULATED ONE
EACH DAY.
I THANK YOU FOR RESPONDING. WHAT WOULD BE THE MACRO FOR THE ABOVE? YOUR HELP IS VERY MUCH APPRECIATED. THANKS

"Otto Moehrbach" wrote:

I gather that you want this date and time to be fixed and not volatile. The
following macro will do that. Note that this macro is a sheet macro and must
be placed in the sheet module of your sheet. To do that, right-click on the
sheet tab, select View Code, and paste this macro into that module. "X" out
of that module to return to your sheet. HTH Otto
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Count 1 Then Exit Sub
If Target.Address(0, 0) = "A2" Then
If IsEmpty(Target.Value) Then
Exit Sub
Else
Range("A1").Value = Now
End If
End If
End Sub
"JKLONEEAGLE" wrote in message
...
I WOULD LIKE THE TIME OF DAY & THE DATE TO APPEAR IN CELL A-1 AUTOMATICALLY
WHEN I POPULATE CELL A-2 WITH ANYTHING NUMBERS OR TEXT. CAN THIS BE DONE
IN
EXCELL?
YOUR HELP WILL BE MUCH APPRECIATED. THANKS






All times are GMT +1. The time now is 10:48 PM.

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