#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 71
Default Time entry help

I am using this formula
=IF(D5="","",NOW())
I want to stop it updating everytime I put a new entry in the worksheet
I need the time to stay static
Cheers!!
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Time entry help

Hi,

Unfortunately that will happen using NOW and there's no way around it using
a formula but you can use a macro. This one looks at a range in column D and
when it changes a static timestamp is put in the adjacent cell in column E.
Right click your sheet tab, view code and paste the code in

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count 1 Or IsEmpty(Target) Then Exit Sub
If Not Intersect(Target, Range("D1:D100")) Is Nothing Then
On Error Resume Next
Application.EnableEvents = False
Target.Offset(, 1) = Time
Application.EnableEvents = True
On Error GoTo 0
End If
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Norm" wrote:

I am using this formula
=IF(D5="","",NOW())
I want to stop it updating everytime I put a new entry in the worksheet
I need the time to stay static
Cheers!!

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7,247
Default Time entry help

You can do it with a circular reference. If you want the result in
cell E5, use

=IF(D5="","",IF(E5="",NOW(),E5))

You'll first need to enable iterative calculations. In Excel 2003 and
earlier, go to the Tools menu, choose Options, then the Calculation
tab. There, check the Iteration box and enter 1 for Max Iterations. In
Excel 2007 and later, click on the Office button, choose Excel
Options, then the Formulas page. There, check Enable Iterative
Calculations and set Max Iterations to 1.

Cordially,
Chip Pearson
Microsoft Most Valuable Professional,
Excel, 1998 - 2010
Pearson Software Consulting, LLC
www.cpearson.com




On Thu, 15 Apr 2010 08:21:01 -0700, Norm
wrote:

I am using this formula
=IF(D5="","",NOW())
I want to stop it updating everytime I put a new entry in the worksheet
I need the time to stay static
Cheers!!

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
Time entry auto changes to date and then time ? Carol @ Prison[_2_] Excel Worksheet Functions 1 November 25th 09 10:01 PM
Time entry with VBA MartinW Excel Discussion (Misc queries) 3 July 25th 07 11:35 AM
Time Entry Robert Excel Discussion (Misc queries) 2 May 16th 07 04:01 AM
Time entry leah Excel Discussion (Misc queries) 9 January 18th 05 01:47 PM
Time Entry mike47338 Excel Worksheet Functions 3 November 18th 04 09:02 PM


All times are GMT +1. The time now is 11:46 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"