Cant update date of 1/0/1900

OUTPOST12

New Member
Joined
Dec 19, 2018
Messages
4
New To Mr Excel.
I need to add a formula that will auto enter the date and time any entry is made in the adjacent cell and keep it there regardless of how many times that sheet is accessed. I need it to capture the date and time of the entry and not change.
When I use a formula like this =IF(D7<>"", IF(C7="",NOW(),C7),""), it returns a date of 1/0/1900. I have researched but cannot figure out how to get it to show the current date.
All help is very much welcome.
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
Try this

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
'Update 20140722
Dim WorkRng As Range
Dim Rng As Range
Dim xOffsetColumn As Integer
Set WorkRng = Intersect(Application.ActiveSheet.Range("B:B"), Target)
xOffsetColumn = 1
If Not WorkRng Is Nothing Then
    Application.EnableEvents = False
    For Each Rng In WorkRng
        If Not VBA.IsEmpty(Rng.Value) Then
            Rng.Offset(0, xOffsetColumn).Value = Now
            Rng.Offset(0, xOffsetColumn).NumberFormat = "dd-mm-yyyy, hh:mm:ss"
        
        End If
    Next
    Application.EnableEvents = True
End If
End Sub
 
Upvote 0
Hi Pete, I appreciate the help. But have to admit I am quite ignorant on how to add that to my excel sheet. If you can advise what i would search to learn how to do it i would appreciate it. Thanks
 
Upvote 0
Hi Mark
Thanks for the help. That is where 1/0/1900 populates. My goal was to have the date appear in that cell.
If you have the formula you posted in C7 you would get a circular reference error. Did you get one?
 
Last edited:
Upvote 0
Hi Mate,

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.
2. Then choose your used worksheet from the left Project Explorer, double click it to open the Module, and then copy and paste following VBA code into the blank Module:

Hope it Helps :)
 
Upvote 0
You have to allow iterative calculations to get your formula to work. File-options-formulas then check enable iterative calculations. That will fix the date time in the formula cell to the first time you add a value to D7. If you want to refresh the date time you have to clear D7 completely then add a new value.
 
Upvote 0
If you have the formula you posted in C7 you would get a circular reference error. Did you get one?

yes

" There are one or more circular references where a formula refers to its own cell either directly or indirectly. This might cause them to calculate incorrrectly.
Try removing or changing these references, or moving the formulas to different cells."

I am absolutely fine abandoning this formula for one that will put in a date and keep it static.

Thanks again.
 
Upvote 0
The whole point of this formula is that it references itself. If it didnt it wouldnt work.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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