Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding date stamp in Excel 2

Status
Not open for further replies.

ziobrtw

IS-IT--Management
Nov 17, 2000
7
US
I would like the ability to add a date stamp (column G) when a value is entered in Column F. I do not want the date value to update. I do not know VB at all. Would someone mind helping me out? Thanks.

(F)Received Qty (G)Received Date
(1) 70 03/19/02
(2) 1 03/19/02
(3)


 
Hi,
You cannot do this with a spreadsheet function, since it would recalculate each time you recalculated, resulting in the current date.

You will need to use the Worksheet_Change event.

1. Alt+F11 activates the VB editor

2. In the Project Explorer, right click the sheet object that you want the date stamp on.

3. In the Object drop down box (in the upper, L-H corner of code window) select Worksheet

4. In the Procedure window (in the upper, R-H corner of code window) select Change

5. Now code for column G changing
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    With Target
        If .Column = Range("G:G").Column Then
            Cells(.Row, "F").Value = Int(Now)
        End If
    End With
End Sub
That should do it. :)

Skip,
metzgsk@voughtaircraft.com
 
ziobrtw,

I ALSO would like to thank Skip - the "proper" way - by giving him a "STAR".

From looking at your "profile", I notice that you haven't yet become aware of this "accepted practice" at Tek-Tips - of issuing STARS as the way of showing appreciation for the time these guys take (probably out of a BUSY schedule) to resolve problems.

Please appreciate that this is the ONLY method of "payment" - i.e. no one receives any other type of remuneration - just the STARS.

Issuing a STARS is a simple matter of clicking on the "Click here to mark this post as a helpful or expert post!" - located in the lower-left-corner of the contributor's posting.

I can appreciate that you were unaware of this practice, but now that you are aware, I hope we can count on you and others to "keep the STARS coming where warranted" …in order to keep these guys "motivated" to keep spending their VALUABLE time in helping to resolves others' problems.

PLEASE treat my posting as ONLY a "reminder" - i.e. PLEASE do NOT issue a STAR for this posting. I want to earn them in the normal manner. Thanks. :)

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Dale,

How about we nominate Skip to write an FAQ and bribe him with offers of more stars?
 
Just offer me a year's supply of

Diet Peach Snapple Skip,
metzgsk@voughtaircraft.com
 
Euskadi and Skip,

There's got to be a subliminal message here...

...perhaps Skip is a:

1) "Peachy" guy, who is a
2) "Snappy" dresser, and has a
3) slight overweight problem.

LOL LOL LOL

"We all luv ya", Skip :)

Regards, ...Dale Watson dwatson@bsi.gov.mb.ca
 
Well, guys...

Let me set you straight.

The "Peachy" part proceeds from my appealing partner in life.
The "Snappy" dresser part is due to the diligence of my dutiful wife.
And FINALLY, the "slightly overweight" part is a consequence of the culinary capabilites of my caring companion.

And, there's nuthin' subliminal about this message...
Code:
FAQ Index

1.Excel How To 
   a.How to Add a DateStamp in Excel 
      -Submitted by SkipVought
       Last Edited 3/19/02     Not rated yet.
:-D Skip,
metzgsk@voughtaircraft.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top