LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 440
Default Remove a date in a cell by code

Hi all,
this code will insert the date in column BD when certain criteria is met in
column Y.
Should the cell in Y change from "W" or become blank at a later date, how do
I adapt this code to remove the date that it has put in?

Private Sub Worksheet_Change(ByVal Target As Range)
' Enters date automatically in BD when "Withdraw or Continue" (Y) = "W"
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("Y4:Y4000")) Is Nothing Then
With Target
If .Value = "W" Then
.Offset(0, 31).Value = Format(Date, "dd mmm yy")
End If
End With
End If
Application.EnableEvents = True
End Sub

Thanks!
--
Traa Dy Liooar

Jock
 
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 remove the auto date function from a cell to allow # rang SKJ18 Excel Discussion (Misc queries) 2 January 8th 08 09:26 AM
Renaming a tab to a date from a cell value (Tom Ogilvy code) Mike K Excel Programming 5 March 9th 07 03:43 PM
Remove Cell Color after Code is Deleted [email protected] Excel Discussion (Misc queries) 4 February 20th 07 07:37 PM
How to remove hyperlink from a cell using VBA code keithb Excel Programming 8 September 2nd 05 03:06 AM
Way to have VB code to filter on entries that have cell with today's date? StargateFan[_3_] Excel Programming 7 May 17th 05 01:44 PM


All times are GMT +1. The time now is 01:33 AM.

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"