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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get excel to put todays date in and not change it tomorrow 2

Status
Not open for further replies.

sgburns2000

IS-IT--Management
Jul 19, 2011
4
US
I have a log in which people enter a time and the date automatically enters in. The problem is that when it is again viewed the next day, that date that was entered changed. Any way around this?
 
How is the date entered exactly?

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 



Check out
[tt]
ctr+;
[SPACE]
ctr+shift+;
[ENTER]
[/tt]


Skip,
[sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
I have coded a cell with the following:

=IF(G18>0,TODAY(),"")

So when an entry is made in cell G18, a date is placed in G17. This code is in all of the cells in row 18. It would be great if there is vb code to do this only when the cell in row 18 is changed.
 
try this...and of course, there are other ways

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Column = 18 Then
If Cells(Target.Row, Target.Column).Value <> "" Then
Cells(Target.Row, 17).Value = Format(Now(), "mm/dd/yy")
End If
End If

end sub

this must be entered on the worksheet...

Ernest

Be Alert, America needs more lerts
 
Did you try Skip's suggestion? No code, no formula, it just works.

That is if you just need to enter the date a field at a time, and do so manually.

Thanks for mentioning those, Skip. I had already forgotten them since they showed up in a favorite shortcuts thread a short while back.

Before that, I had set up my own macro, and assigned it to Ctrl + Q

 
Glad I could help...it's my first time

Ernest

Be Alert, America needs more lerts
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top