Automatic Date insertions

Ducttape19

New Member
Joined
Aug 28, 2002
Messages
46
I would like to be able to have a date inserted into a cell when another cell is modified. Let's say that cell E1 changes, I would like the date that E1 changed on to appear in F2 automatically. Is this at all possible or will I have to keep typing in the date by hand? Thank.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
You have to use the Change() event of the worksheet, like this:

<pre>Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$E$1" Then
Application.EnableEvents = False
Range("F2").Value = Date
Application.EnableEvents = True
End If
End Sub </pre>
 
Upvote 0
Another option.

In F2 use this formula and format as time (Or date and time, or whatever you want !)

=SI(E1,STATICNOW(),"")

and paste this code in a standard module
<pre>Function STATICNOW() As Variant
STATICNOW = Now
End Function</pre>
That way, whenever E1 changes, the formula in F2 will recalculate.
 
Upvote 0
When I try and use the STATICNOW() function I get a #value error. Just STATICNOW() works fine. I don't know???
 
Upvote 0

Forum statistics

Threads
1,223,289
Messages
6,171,230
Members
452,391
Latest member
BHG

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top