![]() |
Enter Static Date with a formula or macro
Is it possible to enter a static date with out using ctrl + ;. I want to be
able to have the date automatically generate when the user enters data in a field and not have the date change when the system date changes. |
Enter Static Date with a formula or macro
Jason, use something like Sheet1.Range("A1") = Date
-- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Jason Southco" wrote in message ... Is it possible to enter a static date with out using ctrl + ;. I want to be able to have the date automatically generate when the user enters data in a field and not have the date change when the system date changes. |
Enter Static Date with a formula or macro
I am kind of a novice... where do I put that? Within a macro?
"Paul B" wrote: Jason, use something like Sheet1.Range("A1") = Date -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Jason Southco" wrote in message ... Is it possible to enter a static date with out using ctrl + ;. I want to be able to have the date automatically generate when the user enters data in a field and not have the date change when the system date changes. |
Enter Static Date with a formula or macro
Jason,
Yes that would be in a macro, it would put the date in sheet1 cell A1 when you run it, To put in this macro, from your workbook right-click the workbook's icon and pick View Code. This icon is to the left of the "File" menu this will open the VBA editor, in Project Explorer click on your workbook name, if you don't see it press CTRL + r to open the Project Explorer, then go to insert, module, and paste the code in the window that opens on the right hand side, press Alt and Q to close this window and go back to your workbook and press alt and F8, this will bring up a box to pick the Macro from, click on the Macro name to run it. If you are using excel 2000 or newer you may have to change the macro security settings to get the macro to run. To change the security settings go to tools, macro, security, security level and set it to medium Sub AddDate 'Will put the date in sheet1 cell A1 Sheet1.Range("A1") = Date End Sub if you are new to macros you may also what to have a look here on getting started with macros http://www.mvps.org/dmcritchie/excel/getstarted.htm If you want to put the date in a cell when you put data in another cell have a look here for ways to do it. http://www.mcgimpsey.com/excel/timestamp.html If you need more help post back with more details of what you want to do. -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Jason Southco" wrote in message ... I am kind of a novice... where do I put that? Within a macro? "Paul B" wrote: Jason, use something like Sheet1.Range("A1") = Date -- Paul B Always backup your data before trying something new Please post any response to the newsgroups so others can benefit from it Feedback on answers is always appreciated! Using Excel 2002 & 2003 "Jason Southco" wrote in message ... Is it possible to enter a static date with out using ctrl + ;. I want to be able to have the date automatically generate when the user enters data in a field and not have the date change when the system date changes. |
All times are GMT +1. The time now is 06:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com