Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how do i auto insert a date and time stamp

I would like to know how to have excel aotomaticaly insert the date and tim
if the adjacent cell is in use. I need the date and time to reflect the time
that the entry was made and not change
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default how do i auto insert a date and time stamp

Enter the following macro in WorkSheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Target.Offset(0, 1).Value = Now()
Application.EnableEvents = True
End Sub

If you are not familiar with VBA, see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

--
Gary's Student
gsnu200703


"cjensen" wrote:

I would like to know how to have excel aotomaticaly insert the date and tim
if the adjacent cell is in use. I need the date and time to reflect the time
that the entry was made and not change

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,624
Default how do i auto insert a date and time stamp

See

http://www.mcgimpsey.com/excel/timestamp.html

In article ,
cjensen wrote:

I would like to know how to have excel aotomaticaly insert the date and tim
if the adjacent cell is in use. I need the date and time to reflect the time
that the entry was made and not change

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 903
Default how do i auto insert a date and time stamp

Couple of items with this question and suggestion.
The question was answered exactly as asked, but you probably
want to put the datetimestamp into a specific column
and not haphazardly next to any cell that has data entered into it,
perhaps column C when column B is filled in. So it
needs to check that the current (target) cell is in column 2
and probably that it is not row 1. Since John also answered
you would be able to see such things in his code.

My page on getstarted.htm is for regular macros there is
a link right at the top for event macros which is what that code
is and that page is
http://www.mvps.org/dmcritchie/excel/event.htm

But you picked up on one important item and that is to turn of
Event checking when changing the cells with a change event
macro. If there is a problem with the macro the event checking
has to be reenabled when is described near the end of the above
http://www.mvps.org/dmcritchie/excel/event.htm#problems
I don't normally mention that when I send people to event.htm
but it can be a problem.

---
HTH,
David McRitchie, Microsoft MVP - Excel
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Gary''s Student" wrote in message
...
Enter the following macro in WorkSheet code:

Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Target.Offset(0, 1).Value = Now()
Application.EnableEvents = True
End Sub

If you are not familiar with VBA, see:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

--
Gary's Student
gsnu200703


"cjensen" wrote:

I would like to know how to have excel automaticaly insert the date and time
if the adjacent cell is in use. I need the date and time to reflect the time
that the entry was made and not change



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
EXCEL GLOBAL DATE AND TIME STAMP BUZZ55 Excel Discussion (Misc queries) 1 December 7th 06 05:21 PM
Date Time Stamp Dilemna [email protected] Excel Discussion (Misc queries) 9 November 1st 06 09:10 PM
Time and Date stamp - Pivot Chart Bemidji Excel Discussion (Misc queries) 6 October 25th 06 02:50 PM
Auto insert Date & Time when another cell is populated Trixie Excel Discussion (Misc queries) 1 October 2nd 06 03:59 AM
Time & Date Stamp 2 worksheets dot Excel Discussion (Misc queries) 2 September 11th 06 06:10 PM


All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"