MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old May 17th, 2002, 02:06 PM   #1
easpeed
 
Join Date: May 2002
Location: New York
Posts: 4
Default

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.
easpeed is offline   Reply With Quote
Old May 17th, 2002, 02:22 PM   #2
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

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 ]
Jay Petrulis is offline   Reply With Quote
Old May 17th, 2002, 02:48 PM   #3
Brian from Maui
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,617
Default

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.
Brian from Maui is offline   Reply With Quote
Old May 17th, 2002, 02:52 PM   #4
Yogi Anand
MrExcel MVP
 
Join Date: Mar 2002
Location: Michigan USA
Posts: 11,448
Default

Quote:
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 ]
Yogi Anand is offline   Reply With Quote
Old May 17th, 2002, 03:07 PM   #5
Brian from Maui
 
Brian from Maui's Avatar
 
Join Date: Feb 2002
Posts: 7,617
Default

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.
Brian from Maui is offline   Reply With Quote
Old May 17th, 2002, 03:07 PM   #6
easpeed
 
Join Date: May 2002
Location: New York
Posts: 4
Default

Quote:
On 2002-05-17 08:52, Yogi Anand wrote:
Quote:
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?
easpeed is offline   Reply With Quote
Old May 17th, 2002, 03:16 PM   #7
easpeed
 
Join Date: May 2002
Location: New York
Posts: 4
Default

Quote:
On 2002-05-17 08:52, Yogi Anand wrote:
Quote:
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?
easpeed is offline   Reply With Quote
Old May 17th, 2002, 03:27 PM   #8
Jay Petrulis
MrExcel MVP
 
Jay Petrulis's Avatar
 
Join Date: Mar 2002
Location: Chicago, IL USA
Posts: 2,042
Default

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
Jay Petrulis is offline   Reply With Quote
Old May 20th, 2002, 07:53 PM   #9
easpeed
 
Join Date: May 2002
Location: New York
Posts: 4
Default

Thank you so much Jay. The first option did the trick.

Quote:
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
easpeed is offline   Reply With Quote
Old May 20th, 2002, 11:37 PM   #10
Ivan F Moala
MrExcel MVP
 
Ivan F Moala's Avatar
 
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,208
Default

Quote:
On 2002-05-17 08:52, Yogi Anand wrote:
Quote:
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 !
__________________
Kind Regards,
Ivan F Moala From the City of Sails
Ivan F Moala is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 08:43 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes