Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default auto set time(now) if criteria=true with no later change

I am using excel to manage a continues progress report on a data base of
users. The report includes set of stages that the users are going through.
Each time a define criteria set on (true), the user is moving from one stage
to the next.

I have a cell in which I mark the entry day (the day the user enter the new
stage). Once the date was set, it should be constant and should not change in
the future, even if the criteria was change.

I am looking for a automated way to set the date (today) but once set, stay
as a constant.

Using =IF(G7+H7+I7 = 1,TODAY(),"") will set the date but once I change
the values in G7/H7/I7 the date is being re-set.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default auto set time(now) if criteria=true with no later change

I'd probably use something like a Worksheet_Change event for this. These are
executed when something is changed on a worksheet. You can selectively run
the code based on which cells change, etc.

See example below:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim myrange As Range
Dim r As Range
Dim EmptyRange As Boolean
Set myrange = Range("G7:I7")

if not intersect(target,myrange) is nothing then
EmptyRange = False
For Each r In myrange
If IsEmpty(r) Then
EmptyRange = True
Exit For
End If
Next r

If EmptyRange Then
Cells("J7").Value = WorksheetFunction.Text(Now, "mm-dd-yyyy")
Else
'Whatever you'd do if you already have something in all cells.
End If
End if
End Sub


"Rafi Benami" wrote:

I am using excel to manage a continues progress report on a data base of
users. The report includes set of stages that the users are going through.
Each time a define criteria set on (true), the user is moving from one stage
to the next.

I have a cell in which I mark the entry day (the day the user enter the new
stage). Once the date was set, it should be constant and should not change in
the future, even if the criteria was change.

I am looking for a automated way to set the date (today) but once set, stay
as a constant.

Using =IF(G7+H7+I7 = 1,TODAY(),"") will set the date but once I change
the values in G7/H7/I7 the date is being re-set.

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
Calculating if 1 for 2 criteria are true The Rook[_2_] Excel Discussion (Misc queries) 3 March 11th 09 05:14 PM
How to auto text colour change to green if logical function true? Al Excel Discussion (Misc queries) 1 December 26th 07 12:05 AM
auto set time(now) if criteria=true with no later change Rafi Benami Excel Worksheet Functions 1 April 24th 07 05:57 AM
adding value only if criteria is true gerryR Excel Worksheet Functions 3 July 7th 06 11:47 AM
Countif( 2 criteria = true ?) MyKool Excel Discussion (Misc queries) 3 October 17th 05 02:04 PM


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