Display Date that does not change everyday.

H

heater

I want to display the date when money is received, and I do not want the date
to change everyday.

Ex: =IF(K24="Yes",TODAY(),IF(K24="No",TODAY(),""))
However, this formula gives today's date and changes each day. I don't want
it to change.
 
H

heater

I went to that link, but I am a novice in VB and could not get it to work. I
copied the following in VB, but nothing happened.

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

How do you make the macro work?
 
G

Gord Dibben

heater

This is an event macro. Works when you change a cell value in the range
k24:k86.

Sticks a static date in the cell to the right of the one that got changed.

The code is palced in the worksheet module.

Right-click on the sheet tab and "View Code". Paste in there.

Make a change like enter something in k24 and see date appear in l24


Gord Dibben Excel MVP
 
J

jrm

hi sorry to intrude... i also used the same code and it worked like a charm.
I just want to ask if i can specify where the date will be located. right
now the date only appears to the next column of the data. and since want to
monitor 2 columns ie (J:K), i want the date to appear in column L. Also i
use the list function for my files and seems that the comp is taking such a
long time to calculate, is there a way for me to limit the code to operate
only within the list?

Any help would be great! thanks!
 
Top