Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 262
Default Automatically entering date

i am using the below formula to update a date in a cell when another cell is
populated.

=IF(B2<"",TODAY(),"")

However, when opened the next day the date updates to the current day
despite the fact that cell B2 is not modified. Is there a way or formula to
ensure that the date remains the same as when it was originally entered?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Automatically entering date

Not if you want to keep it a formula.

J.E. McGimpsey shows a way to put a time stamp on the same row when something
changes:

http://www.mcgimpsey.com/excel/timestamp.html

keith wrote:

i am using the below formula to update a date in a cell when another cell is
populated.

=IF(B2<"",TODAY(),"")

However, when opened the next day the date updates to the current day
despite the fact that cell B2 is not modified. Is there a way or formula to
ensure that the date remains the same as when it was originally entered?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Automatically entering date

If I wanted the date to populate only when a certain value is entered into
the cell, how would I modify J.E. McGimpsey's macro?

Thank,
Scott

"Dave Peterson" wrote:

Not if you want to keep it a formula.

J.E. McGimpsey shows a way to put a time stamp on the same row when something
changes:

http://www.mcgimpsey.com/excel/timestamp.html

keith wrote:

i am using the below formula to update a date in a cell when another cell is
populated.

=IF(B2<"",TODAY(),"")

However, when opened the next day the date updates to the current day
despite the fact that cell B2 is not modified. Is there a way or formula to
ensure that the date remains the same as when it was originally entered?


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Automatically entering date

Without looking, put this is the sheet module. This will put the date in
cell f1 if a value of more than 22 is entered in cell f1.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$F$1" Then Exit Sub
Application.EnableEvents = False
If Target 22 Then
Target = Date
Else
Target = ""
End If
Application.EnableEvents = True
End Sub
--
Don Guillett
SalesAid Software

"Scott Marcus" wrote in message
...
If I wanted the date to populate only when a certain value is entered into
the cell, how would I modify J.E. McGimpsey's macro?

Thank,
Scott

"Dave Peterson" wrote:

Not if you want to keep it a formula.

J.E. McGimpsey shows a way to put a time stamp on the same row when
something
changes:

http://www.mcgimpsey.com/excel/timestamp.html

keith wrote:

i am using the below formula to update a date in a cell when another
cell is
populated.

=IF(B2<"",TODAY(),"")

However, when opened the next day the date updates to the current day
despite the fact that cell B2 is not modified. Is there a way or
formula to
ensure that the date remains the same as when it was originally
entered?


--

Dave Peterson



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Automatically entering date

Well, what I wanted to do is if the cell in column F reads "Closed" than the
date that the word Closed entered cell F would show up in cell J of the same
row. J.E. McGimpsey's macro puts the date in when any value is entered, but
again, I only want it when the cell says "Closed". I figured there's just
one line I could replace with another to fix it, but I can't seem to figured
out what it is:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .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


"Don Guillett" wrote:

Without looking, put this is the sheet module. This will put the date in
cell f1 if a value of more than 22 is entered in cell f1.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$F$1" Then Exit Sub
Application.EnableEvents = False
If Target 22 Then
Target = Date
Else
Target = ""
End If
Application.EnableEvents = True
End Sub


Thanks again,
Scott
--
Don Guillett
SalesAid Software

"Scott Marcus" wrote in message
...
If I wanted the date to populate only when a certain value is entered into
the cell, how would I modify J.E. McGimpsey's macro?

Thank,
Scott

"Dave Peterson" wrote:

Not if you want to keep it a formula.

J.E. McGimpsey shows a way to put a time stamp on the same row when
something
changes:

http://www.mcgimpsey.com/excel/timestamp.html

keith wrote:

i am using the below formula to update a date in a cell when another
cell is
populated.

=IF(B2<"",TODAY(),"")

However, when opened the next day the date updates to the current day
despite the fact that cell B2 is not modified. Is there a way or
formula to
ensure that the date remains the same as when it was originally
entered?

--

Dave Peterson






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Automatically entering date

Private Sub Worksheet_Change(ByVal Target As Range)
If Not Intersect(Range("f2:f1000"), Cells) Is Nothing Then
'Application.EnableEvents = False 'not needed
If UCase(Target) = "CLOSED" Then Target.Offset(, 4) = Date
End If
'Application.EnableEvents = True 'not needed
End Sub

--
Don Guillett
SalesAid Software

"Scott Marcus" wrote in message
...
Well, what I wanted to do is if the cell in column F reads "Closed" than
the
date that the word Closed entered cell F would show up in cell J of the
same
row. J.E. McGimpsey's macro puts the date in when any value is entered,
but
again, I only want it when the cell says "Closed". I figured there's just
one line I could replace with another to fix it, but I can't seem to
figured
out what it is:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("A2:A10"), .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


"Don Guillett" wrote:

Without looking, put this is the sheet module. This will put the date in
cell f1 if a value of more than 22 is entered in cell f1.

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address < "$F$1" Then Exit Sub
Application.EnableEvents = False
If Target 22 Then
Target = Date
Else
Target = ""
End If
Application.EnableEvents = True
End Sub


Thanks again,
Scott
--
Don Guillett
SalesAid Software

"Scott Marcus" wrote in message
...
If I wanted the date to populate only when a certain value is entered
into
the cell, how would I modify J.E. McGimpsey's macro?

Thank,
Scott

"Dave Peterson" wrote:

Not if you want to keep it a formula.

J.E. McGimpsey shows a way to put a time stamp on the same row when
something
changes:

http://www.mcgimpsey.com/excel/timestamp.html

keith wrote:

i am using the below formula to update a date in a cell when another
cell is
populated.

=IF(B2<"",TODAY(),"")

However, when opened the next day the date updates to the current
day
despite the fact that cell B2 is not modified. Is there a way or
formula to
ensure that the date remains the same as when it was originally
entered?

--

Dave Peterson






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 10,124
Default Automatically entering date

Private Sub Worksheet_Calculate()
'=IF(B2<"",TODAY(),"")
If Range("b2") = 22 Then Range("b3") = Date
End Sub

--
Don Guillett
SalesAid Software

"Scott Marcus" wrote in message
...
If I wanted the date to populate only when a certain value is entered into
the cell, how would I modify J.E. McGimpsey's macro?

Thank,
Scott

"Dave Peterson" wrote:

Not if you want to keep it a formula.

J.E. McGimpsey shows a way to put a time stamp on the same row when
something
changes:

http://www.mcgimpsey.com/excel/timestamp.html

keith wrote:

i am using the below formula to update a date in a cell when another
cell is
populated.

=IF(B2<"",TODAY(),"")

However, when opened the next day the date updates to the current day
despite the fact that cell B2 is not modified. Is there a way or
formula to
ensure that the date remains the same as when it was originally
entered?


--

Dave Peterson



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 37
Default Automatically entering date

If you are prepared to enable circular references then, assuming the date
is in B6 :

=IF(AND(B2<"", B6=""),TODAY(),"")


"keith" wrote in message
...
i am using the below formula to update a date in a cell when another cell
is
populated.

=IF(B2<"",TODAY(),"")

However, when opened the next day the date updates to the current day
despite the fact that cell B2 is not modified. Is there a way or formula
to
ensure that the date remains the same as when it was originally entered?



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
Automatically filling date of today (without it changing tomorrow) Jaydubs Excel Discussion (Misc queries) 5 June 27th 06 05:11 PM
Is it possible to automatically change color of cell by keying off the date? ChuckF Excel Worksheet Functions 1 April 3rd 06 05:02 AM
Automatically Add in 56days to the date Kelly Lim Excel Discussion (Misc queries) 2 July 4th 05 03:19 AM
How do I automatically calculate YTD numbers by changing a date? MDSistah Excel Worksheet Functions 1 April 29th 05 05:52 PM
Date in descending order to come up automatically in a column? Snugglebums Excel Worksheet Functions 2 January 11th 05 03:09 PM


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