Non-volatile timestamp (revisited)

easpeed

New Member
Joined
May 16, 2002
Messages
4
I have a problem similar to Ozone64's posting of 4/23 that I am trying to generate automatic time/datestamps in a cell whenever a value is entered in an adjacent cell. I am currently using the function =IF(A3<>"",NOW()) but the problem is when data is entered in subsequent rows the previous timestamp is overridden with the new timestamp. Thus at the conclusion of data entry every row ends up with the same date/timestamp as the final entry.

Any help is appreciated.
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
Hi,

You can use an event macro to do this.

Right click on the sheet tab and choose View Code. Then, copy the following and exit the VB editor to go back to Excel

'-----------------
Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Cells.Count = 1 And Target.Column = 1 Then
Target.Offset(0, 1) = Now
End If
End Sub
'------------------

This will add the date/time stamp in column B at any change in column A.

HTH,
Jay
This message was edited by Jay Petrulis on 2002-05-17 08:40
 
Upvote 0
easpeed,

I hope someone can automate this concept using data validation, without a macro (only because I don't know enough about macro's and how to use them). I got this from the archives.
In a cell enter =now() or =today()
In the cell where you want the date, go to data validation, select list and reference the cell with now or today. Then the date or time does not change.
 
Upvote 0
On 2002-05-17 08:48, Brian from Maui wrote:
easpeed,

I hope someone can automate this concept using data validation, without a macro (only because I don't know enough about macro's and how to use them). I got this from the archives.
In a cell enter =now() or =today()
In the cell where you want the date, go to data validation, select list and reference the cell with now or today. Then the date or time does not change.

Hi Brian:

=TODAY(), and =NOW() will keep updating the dates dynamically ... to turn them into static values, these will have to copied as values at each instance of date stamping.

So in my opinion, an event oriented VBA based solution is the way to go on this one.

Regards!
This message was edited by Yogi Anand on 2002-05-17 08:53
 
Upvote 0
Yogi,

I understand. My point being, maybe someone like yourself, Mark W., Aladin, or Jay could take this concept one step further a make it not as cumbersome or automate someway.
 
Upvote 0
On 2002-05-17 08:52, Yogi Anand wrote:
On 2002-05-17 08:48, Brian from Maui wrote:
easpeed,

I hope someone can automate this concept using data validation, without a macro (only because I don't know enough about macro's and how to use them). I got this from the archives.
In a cell enter =now() or =today()
In the cell where you want the date, go to data validation, select list and reference the cell with now or today. Then the date or time does not change.

Hi Brian:

=TODAY(), and =NOW() will keep updating the dates dynamically ... to turn them into static values, these will have to copied as values at each instance of date stamping.

So in my opinion, an event oriented VBA based solution is the way to go on this one.

Regards!
This message was edited by Yogi Anand on 2002-05-17 08:53

I agree Yogi, my issue is I have two other columns I have automatically populating based upon the entry in column A. So data is entered in column A and then formulas in column B & C populate those adjacent fields and I want the date/timestamp to populate in column D.

Any idea how I might tweak the VB to get this to work?
 
Upvote 0
On 2002-05-17 08:52, Yogi Anand wrote:
On 2002-05-17 08:48, Brian from Maui wrote:
easpeed,

I hope someone can automate this concept using data validation, without a macro (only because I don't know enough about macro's and how to use them). I got this from the archives.
In a cell enter =now() or =today()
In the cell where you want the date, go to data validation, select list and reference the cell with now or today. Then the date or time does not change.

Hi Brian:

=TODAY(), and =NOW() will keep updating the dates dynamically ... to turn them into static values, these will have to copied as values at each instance of date stamping.

So in my opinion, an event oriented VBA based solution is the way to go on this one.

Regards!
This message was edited by Yogi Anand on 2002-05-17 08:53

I agree Yogi, my issue is I have two other columns I have automatically populating based upon the entry in column A. So data is entered in column A and then formulas in column B & C populate those adjacent fields and I want the date/timestamp to populate in column D.

Any idea how I might tweak the VB to get this to work?
 
Upvote 0
Hi,

To get the time/date stamp in column D, change

target.offset(0,1)

to

target.offset(0,3) = Now
or
Range("D" & Target.Row) = Now

I don't think a Data Validation option is possible, because that will only bound the allowable entries, not enter something inthe cell.

Bye,
Jay
 
Upvote 0
Thank you so much Jay. The first option did the trick.

On 2002-05-17 09:27, Jay Petrulis wrote:
Hi,

To get the time/date stamp in column D, change

target.offset(0,1)

to

target.offset(0,3) = Now
or
Range("D" & Target.Row) = Now

I don't think a Data Validation option is possible, because that will only bound the allowable entries, not enter something inthe cell.

Bye,
Jay
 
Upvote 0
On 2002-05-17 08:52, Yogi Anand wrote:
On 2002-05-17 08:48, Brian from Maui wrote:
easpeed,

I hope someone can automate this concept using data validation, without a macro (only because I don't know enough about macro's and how to use them). I got this from the archives.
In a cell enter =now() or =today()
In the cell where you want the date, go to data validation, select list and reference the cell with now or today. Then the date or time does not change.

Hi Brian:

=TODAY(), and =NOW() will keep updating the dates dynamically ... to turn them into static values, these will have to copied as values at each instance of date stamping.

So in my opinion, an event oriented VBA based solution is the way to go on this one.

Regards!
This message was edited by Yogi Anand on 2002-05-17 08:53

Hi Yogi, The technique that Brian descibes
works, it is something that was posted @ the
old board. Try it out, you will see that
data validation will hold its initial value
when set even when you recalculate, close & reopen etc. Try it ! :wink:
 
Upvote 0

Forum statistics

Threads
1,216,098
Messages
6,128,812
Members
449,468
Latest member
AGreen17

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