# Microsoft Office Application Help - Excel Help forum > For Other Platforms(Mac, Google Docs, Mobile OS etc) >  >  Date stamp that doesn't change.

## Nitefox

I have a cell (D column) that inputs todays date when data is entered into the cell 3 columns over (G column). However when I go to enter data the next day it updates the date on every row. How can I prevent this from happening?
This is my code:
=IFERROR(IF($G61="", "", TODAY()), "")

----------


## millz

That's because your formula is returning the current date whenever it is run. After you have entered data in column G, copy the respective rows updated in column D, and paste special over as values.

----------


## Nitefox

Sorry, relatively speaking im an Excel beginner. Im not sure what that means. What should I change the code to so they dont keep updating? Can I do it within the cell or do I have to use VB?

----------


## millz

You don't need to change the code, I assume your column D is already filled with the formula stated in the first post.

So, whenever you enter data i column G, let's say rows 2 to 10, your formula in column D will automatically show today's date for rows 2 to 10.
Now select cells D2:D10, copy it, and right click on it, choose Paste Special, choose values, and click OK. This removes the formula for those particular rows, and will not have any changes in the date anymore.

----------


## Nitefox

I guess thats possible, but im trying to automate the entire process so the user doesnt have to do that every time. They could easily forget to do this. I assumed there was a simple slight formula change that would just prevent it from updating after the first date. Is that not possible? Not even with VB?

----------


## millz

It's possible to be done through VBA, but that would also mean your workbook will need to be saved as a macro-enabled workbook. And each time it is run/opened by your users, he/she will also need to enable the macros before it would work, unless the workbook is opened in a trusted location.

----------


## jrtraylor

I have not seen this as being possible with a formula.

here is a macro that will put the current date into column D once you enter data into column G and tab over to the next cell. Note when you copy data from a cell to an empty cell in column G, this will not work as it requires you to activate the cell in column G




```
Please Login or Register  to view this content.
```


This code should be put into the worksheet module. Right click the sheet name and select View Code. Paste the code into the VB Editor. Save the file as a macro enabled workbook if using excel 2007 or greater.

----------


## Nitefox

That seems to bo working, however it can only get it to work on a blank new sheet, not on the sheet I need it on. On the sheet I need it I get Ambiguous name detected: Worksheet_Change
I think its because I already have the following code above it for that sheet:




```
Please Login or Register  to view this content.
```


*Moderator Note:*

Pls use code tags around your code next time as per forum *rules.*

----------


## Fotis1991

You can do this using formulas if you like.

See *here* and* here.*

----------


## Nitefox

Fotis thanks for your reply. The formula jrtaylor gave me works just fine. The issue im having is that I already have another formula for that worksheet (the one I pasted above). When I put the data stamp on a blank worksheet it works fine, but when I add it to the worksheet that already has another VA formula on it it doesnt like it. Im guessing I have to someone write the two formulas into one. Is that correct, and if so how do I do that?

----------


## jrtraylor

Here you go. You need to put my code before your code within the same change event routine. 




```
Please Login or Register  to view this content.
```

----------


## Nitefox

Great, that worked. Thank you.

----------


## jrtraylor

Glad to help

----------


## jrtraylor

Ohhh, by the way you can change the range in my code to match the range in your code.
This



```
Please Login or Register  to view this content.
```


To



```
Please Login or Register  to view this content.
```


This way the date will populate all the way to the bottom of the sheet.

----------


## Nitefox

Is there a way I can change this code so it only enters the date when data is first entered into G. If G is edited or deleted the date should not change.




```
Please Login or Register  to view this content.
```


Thanks

----------

