Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I would like to have the current date and time automatically populate in the
first column when anything else is entered on the same row. I am not proficient with macros, etc., so I will need detailed info. Any help is certainly appreciated! Denise |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Denise
You would use a Worksheet_Change event macro. The possible problem is that this macro will fire (execute) whenever ANY change is made to the contents of ANY cell in the entire sheet. You can write code (the instructions in the macro) to do some action only if the target cell (the cell that changed) is within some range. Doing so will keep the date/time from being inserted when you are doing things in some other part of the sheet. Can you provide some details about the range in which you want this to happen? The macro would look something like the following. I chose A1:N100 as the range you want. Note that such a macro MUST be placed in the sheet module of the sheet in which you want this to happen. To access that module, right-click the sheet tab, and select View Code. Paste this macro into that module. "X" out of the module to return to your sheet. HTH Otto Private Sub Worksheet_Change(ByVal Target As Range) If Target.Count 1 Then Exit Sub If Not Intersect(Target, Range("A1:N100")) Is Nothing Then If IsEmpty(Target.Value) Then Exit Sub Application.EnableEvents = False Cells(Target.Row, 1).Value = Now Application.EnableEvents = True End If End Sub "D. West" wrote in message ... I would like to have the current date and time automatically populate in the first column when anything else is entered on the same row. I am not proficient with macros, etc., so I will need detailed info. Any help is certainly appreciated! Denise |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Assuming 'the first column' is Column A, You can use something like this.
=IF(COUNTA(B3:IV3)<0,NOW(),"") Format Column A for your desired date/time format. -- Hope this helps. Thanks in advance for your feedback. Gary Brown "D. West" wrote: I would like to have the current date and time automatically populate in the first column when anything else is entered on the same row. I am not proficient with macros, etc., so I will need detailed info. Any help is certainly appreciated! Denise |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
count how many times a date appears | Excel Discussion (Misc queries) | |||
date calculation between two times | Excel Discussion (Misc queries) | |||
Calculate Difference in Times with Considering Date | Excel Worksheet Functions | |||
Difference between date and times | Excel Discussion (Misc queries) | |||
number of hours between two date/times | Excel Discussion (Misc queries) |