PC Review


Reply
Thread Tools Rate Thread

date stamp to keep date

 
 
wpreqq99@yahoo.com
Guest
Posts: n/a
 
      2nd Apr 2009
When user types in the letter Y in Column P, I want the next cell, in
Column Q to show the current date. I want that date to stay, and not
change tomorrow. So, the NOW function doesn't work for me.

I looked in here yesterday, and found what I thought was the answer. I
put this in a module.

Function DateAndTime()
DateAndTime = Now
End Function

When I tested it yesterday, it seemed to work ok. Of course I couldn't
tell until today, when the system clock changed. Today, I see the date
of 4/1 didn't hold. It now says 4/2.

Is there something else I can try? I can't change the system clock in
order to test it all out. I have to wait until the next day.
Please help!!
Thanks
j.o.
 
Reply With Quote
 
 
 
 
Mike H
Guest
Posts: n/a
 
      2nd Apr 2009
Hi,

Right click your sheet tab, view code and paste this in and you get a static
date in column q if Y is entered in col P

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column <> 16 Or Target.Cells.Count > 1 _
Or IsEmpty(Target) Then Exit Sub
If UCase(Target.Value) = "Y" Then
Target.Offset(, 1).Value = Date
End If
End Sub

Mike

"(E-Mail Removed)" wrote:

> When user types in the letter Y in Column P, I want the next cell, in
> Column Q to show the current date. I want that date to stay, and not
> change tomorrow. So, the NOW function doesn't work for me.
>
> I looked in here yesterday, and found what I thought was the answer. I
> put this in a module.
>
> Function DateAndTime()
> DateAndTime = Now
> End Function
>
> When I tested it yesterday, it seemed to work ok. Of course I couldn't
> tell until today, when the system clock changed. Today, I see the date
> of 4/1 didn't hold. It now says 4/2.
>
> Is there something else I can try? I can't change the system clock in
> order to test it all out. I have to wait until the next day.
> Please help!!
> Thanks
> j.o.
>

 
Reply With Quote
 
wpreqq99@yahoo.com
Guest
Posts: n/a
 
      2nd Apr 2009
On Apr 2, 8:58*am, wpreq...@yahoo.com wrote:
> When user types in the letter Y in Column P, I want the next cell, in
> Column Q to show the current date. I want that date to stay, and not
> change tomorrow. So, the NOW function doesn't work for me.
>
> I looked in here yesterday, and found what I thought was the answer. I
> put this in a module.
>
> Function DateAndTime()
> DateAndTime = Now
> End Function
>
> When I tested it yesterday, it seemed to work ok. Of course I couldn't
> tell until today, when the system clock changed. Today, I see the date
> of 4/1 didn't hold. It now says 4/2.
>
> Is there something else I can try? *I can't change the system clock in
> order to test it all out. I have to wait until the next day.
> Please help!!
> Thanks
> j.o.


OH, I forgot..... this range in Column Q is protected..... in case
this makes a difference.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Created or Date Modified Record Stamp =?Utf-8?B?Um9zZQ==?= Microsoft Access 1 13th May 2007 07:24 PM
Create a button that will date stamp todays date in a cell Tom Meacham Microsoft Excel Misc 3 11th Jan 2006 01:08 AM
Date stamp spreadsheet in excel to remind me of completion date =?Utf-8?B?QmlnIGZlbGxh?= Microsoft Excel Worksheet Functions 1 18th Oct 2005 04:10 PM
date stamp Can I add a date stamp in a Text or Memo Field =?Utf-8?B?TWljaGFlbCBM?= Microsoft Access Database Table Design 10 11th Apr 2005 02:29 AM
Date Stamp: date last changed Macro Rachelynn Microsoft Excel Worksheet Functions 3 20th Jul 2004 05:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:43 AM.