Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
How do I make it so if data is inputted into one cell then another cell produces the date. So... if A1 has any data B1 will show the current date. I do not want the date to change everyday or every time the document is opened in Excel 2007

This formual worked but when I opened the document this morning the date changed from yesteday's date to today's. I want the date entered when text is entered not to change. Is there a way to have the date come up but not change everytime the document is opened?
I truly appreciate your response yesterday

I guess you confused me with this line:
So... if A1 has any data B1 will show the current date.
Current to me meant current at all times.
Anyway...
To place the date (and time) automatically when the cell is changed, but not have it change when you open the file, you have to use a Change Event macro.
Whenever A1 is changed this code will put the value of Now() in the cell, instead of the ever-changing NOW() function.
Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address = "$A$1" Then Range("B1") = Now() End SubRight-click the sheet tab, choose View Code and paste this in the window that opens.

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |