|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Private Sub Worksheet_Change(ByVal Target As Range)
If Not Application.Intersect(Target, Columns("A:A")) Is Nothing Then
Target.Offset(0, 1).Value = Format(Now, "mm dd yyyy h:mm:ss")
End If
End Sub
This is sheet event code.
Right-click on the sheet tab and "View Code"
Copy/paste into that module.
Alt + q to return to the Excel window.
Enter something in a cell in column A and a static date/time will be entered
in column B
Gord Dibben MS Excel MVP
On Sat, 14 Mar 2009 10:43:03 -0700, MikeW <MikeW@discussions.microsoft.com>
wrote:
>Rick, I'm trying to do the same thing, could you explain the VB event code
>I'd have to use?
>
>"Rick Rothstein" wrote:
>
>> I'm assuming that once the date is added to the worksheet, you would not
>> want it to change. If that is the case, you will need to use VB event code
>> to handle this. Is a VB solution an acceptable choice?
>>
>> --
>> Rick (MVP - Excel)
>>
>>
>> "aspect30" <aspect30@discussions.microsoft.com> wrote in message
>> news:AF5F11F6-12C8-4A22-9807-3B6BF825AEFF@microsoft.com...
>> > How can I make today's date auto fill in a cell upon entering data in
>> > another
>> > cell. I would like the cell B1 that contains the date to remain empty
>> > until I
>> > enter data in cell A1.
>> > Please advise.
>> > Thanks.
>> >
>> > "Paul B" wrote:
>> >
>> >> AdrianXing, you could put =TODAY() in a cell and it will up date, if you
>> >> don't want the date to change after you put it in use some code in the
>> >> workbook open event to do it, like this
>> >>
>> >> Sheets("Sheet1").Range("A1") = Date
>> >>
>> >> --
>> >> Paul B
>> >> Always backup your data before trying something new
>> >> Please post any response to the newsgroups so others can benefit from it
>> >> Feedback on answers is always appreciated!
>> >> Using Excel 2002 & 2003
>> >>
>> >> "AdrianXing" <AdrianXing@discussions.microsoft.com> wrote in message
>> >> news:5F26601D-A0A5-468F-817F-1D58A4FDB9C2@microsoft.com...
>> >> > Does anyone know of a function that can make Excel automatically insert
>> >> > the
>> >> > current date into a cell when a file is opened up?
>> >>
>> >>
>> >>
>>
>>
|
| |
|
| |
Was this post helpful to you? |
|
|
|
|
|
|
|
Reply |
| |
 |
|
Top |
|
|
|
|
|
|
|
|
|
|
|
|
|
|