Saving the correct date, using TODAY()

SevenD

New Member
Joined
Dec 16, 2009
Messages
1
I’m trying to use a formula to check the cell to the right, and if there’s any data in there, it fills the cell containing the formula with today’s date. Well I’d like it to fill it in with the date that the data was entered into the neighboring cell and then remain that date forever, but instead, it’s resetting the dates on those cells every time I open the sheet. <o:p> </o:p>
For example, I entered some data yesterday, and it worked swimmingly, entering the correct date of 12/15/2009, but when I opened up that sheet today, all of those dates had been changed to 12/16/2009. I’m not sure how to fix this. Here’s the formula in question:
<o:p> </o:p>
=IF(RC[1]="","",TODAY())
<o:p> </o:p>
It feels like there should be a way to convert “TODAY()” into a string before placing that date into the cell but I can’t figure out how to do that.


I also tried =IF(RC[1]="","",TEXT(TODAY(), "mm/dd/yyyy")) but that didn't work either. any ideas?

Thanks!
 

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
This does what you want to do. Change the column number to whatever you wish.

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
   If Target.Column = 1 Then
      ActiveCell.Offset(-1, 1).Value = Date
   End If
End Sub

Insert this code into the worksheet module.
 
Upvote 0

Forum statistics

Threads
1,215,544
Messages
6,125,434
Members
449,223
Latest member
Narrian

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