#1   Report Post  
Posted to microsoft.public.excel.misc
sigfreund
 
Posts: n/a
Default NOW() keeps changing


I am trying to use now() in a colum to record the time another cell is
changed. Works great until the next cell is changed, instead of
getting a colum of times recording when each cell is entered I end up
with a colum identical times all changing to the time the last cell was
entered. How do I keep the time from changing once my formula enters it
into the cell?
=if(a1<"",now())


--
sigfreund
------------------------------------------------------------------------
sigfreund's Profile: http://www.excelforum.com/member.php...o&userid=32096
View this thread: http://www.excelforum.com/showthread...hreadid=518856

  #2   Report Post  
Posted to microsoft.public.excel.misc
Jim May
 
Posts: n/a
Default NOW() keeps changing

The below code pasted into your worksheet code module
will do fine <<Modify Range B6:B20 to your Range before testing,,

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("B6:B20"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, 1)
.NumberFormat = "dd mmm yyyy hh:mm:ss"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub


"sigfreund" wrote:


I am trying to use now() in a colum to record the time another cell is
changed. Works great until the next cell is changed, instead of
getting a colum of times recording when each cell is entered I end up
with a colum identical times all changing to the time the last cell was
entered. How do I keep the time from changing once my formula enters it
into the cell?
=if(a1<"",now())


--
sigfreund
------------------------------------------------------------------------
sigfreund's Profile: http://www.excelforum.com/member.php...o&userid=32096
View this thread: http://www.excelforum.com/showthread...hreadid=518856


  #3   Report Post  
Posted to microsoft.public.excel.misc
sigfreund
 
Posts: n/a
Default NOW() keeps changing


I found a way to keep the time from changing as I enter my data down the
colum. I added a conditional so once a time was entered the formula
went from now() to a direct cell ref to itself.

=IF(L1<"",IF(K2="",NOW(),K1),"")

this is the formula for cell k1


--
sigfreund
------------------------------------------------------------------------
sigfreund's Profile: http://www.excelforum.com/member.php...o&userid=32096
View this thread: http://www.excelforum.com/showthread...hreadid=518856

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
Formula changing hookahbrain Excel Discussion (Misc queries) 3 January 19th 06 10:12 PM
Changing format of number without changing the value sweetsue516 Excel Discussion (Misc queries) 2 August 22nd 05 04:07 PM
Problem with formulas changing cell reference janicesweet Excel Discussion (Misc queries) 1 August 2nd 05 06:23 PM
How do I stop excel automatically changing my date to 2005? zoemcb Excel Discussion (Misc queries) 6 April 30th 05 02:39 AM
changing page break in an excel file ibs81 New Users to Excel 1 April 14th 05 07:03 PM


All times are GMT +1. The time now is 12:02 PM.

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

About Us

"It's about Microsoft Excel"