Auto fill today's date
Hi,
You confused me a bit there because that was what it was supposed to do
until I spotted a typo.
Change this line
Offset(0, 1).ClearContents
to this
Offset(0, -1).ClearContents
Mike
"nabanco" wrote:
Mike, is there a way to delete the date in the event there is nothing in
column B?
"Mike H" wrote:
Hi,
Right click the sheet tab, view code and paste this in.
Private Sub Worksheet_Change(ByVal Target As Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(Range("B1:B16"), .Cells) Is Nothing Then
Application.EnableEvents = False
If IsEmpty(.Value) Then
.Offset(0, 1).ClearContents
Else
With .Offset(0, -1)
.NumberFormat = "dd mm yy"
.Value = Now
End With
End If
Application.EnableEvents = True
End If
End With
End Sub
Mike
"nabanco" wrote:
Hello,
How would I alter the below to put today's date in column A if a word is
entered into column B? For example, when "tower" is typed into B16, A16
automatically puts todays date in 07/07/07 format?
Thanks for your help
|