Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 28
Default Auto enter date

J. E. McGimpsey's code for date stamps works great. My question is, what if
I want to date stamp when only a certain value is entered, how would I do
that?

Here's the code with some of my specifics:

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("F6:F9999"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 5).ClearContents
Else
With .Offset(0, 5)
.NumberFormat = "mm-dd-yy"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub

I'd like Column K to be date stamped only when the value of column F =
"Closed". With every other value, including blank, I'd like column K to be
empty, even if it previously had a value. Does anyone know how I can
accomplish this?

 
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
how do i enter a date before jan 1, 1900 into excel? barry Excel Discussion (Misc queries) 1 October 25th 06 12:38 PM
Auto Date with Manual Entry Protection JBallance Excel Worksheet Functions 1 September 23rd 06 02:47 AM
Date formulas DRondeau Excel Discussion (Misc queries) 7 September 6th 06 09:53 PM
Excel: I enter date and format for date, but shows as number spohar Excel Discussion (Misc queries) 2 March 10th 06 08:40 PM
auto dating after entering the first date Jomo Watts Excel Worksheet Functions 2 April 5th 05 03:05 PM


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