Insert Automatic, Non-Updating Date Stamp

I use an Excel invoice to bill clients.
Currently I have an Invoice Date field which is populated by the
=TODAY() function. That's good. However, if I open the spreadsheet down
the road and accidentally recalculate, the Invoice Date field is
updated with the current date. That's not so good.

Is there a simple macro I can use that Inserts the date when the
document is created and then terminates? Something, I guess, that calls
the TODAY() function and then pops the resulting date value into the
appropriate cell.

I know I can just use CTRL+; to insert the date manually but I'm
shooting for *fewer* things that I can potentially forget when
invoicing.

Thanks,

KZ

0
imafellow (28)
12/22/2005 6:04:22 PM
excel.misc 78881 articles. 5 followers. Follow

8 Replies
877 Views

Similar Articles

[PageSpeed] 30

One way:

Put this in your ThisWorkbook code module. Change "A1" to whatever cell 
you want the date to be entered in, and modify the date format to suit:

    Private Sub Workbook_Open()
        With Sheets(1).Range("A1")
            If IsEmpty(.Value) Then
                .NumberFormat = "dd mmmm yyyy"
                .Value = Date
            End If
        End With
    End Sub

Save your template with A1 cleared.


In article <1135274662.451756.22030@g43g2000cwa.googlegroups.com>,
 "Ken Zenachon" <imafellow@gmail.com> wrote:

> I use an Excel invoice to bill clients.
> Currently I have an Invoice Date field which is populated by the
> =TODAY() function. That's good. However, if I open the spreadsheet down
> the road and accidentally recalculate, the Invoice Date field is
> updated with the current date. That's not so good.
> 
> Is there a simple macro I can use that Inserts the date when the
> document is created and then terminates? Something, I guess, that calls
> the TODAY() function and then pops the resulting date value into the
> appropriate cell.
> 
> I know I can just use CTRL+; to insert the date manually but I'm
> shooting for *fewer* things that I can potentially forget when
> invoicing.
> 
> Thanks,
> 
> KZ
0
jemcgimpsey (6723)
12/22/2005 6:13:30 PM
Thanks, I'll try that and get back to you.

KZ

0
imafellow (28)
12/28/2005 2:59:33 AM
JE,

i tried this code in excel 03 on xp and it does not work.... well it must 
coming from you but i am not seeing it happen...lol...i think it is me.  

I have a workbook that has a customer info sheet which creates a 1-of-a-kind 
number based on the customers first and last names and the date customer 
calls for service.  Right now i must manualy enter the date so the customer 
number can be generated.  can you help....

this is the basic look of the sheet

My Co. Name                                           DATE
__________________________________________
last name                                    Customer No.
first name
__________________________________________
Cust. Address
Street
City St. Zip

DATE = Cell I1:J1  this is the cell which needs the auto date (date format 
should be mmddyy with no puctuation)... this date can not however be volitile 
or the customer number will change and that would be bad...lol

another thing i am having bad luck with is - i need to "auto save as" the 
workbook b4 closeing .... i would like to have the workbook saved using the 
generated customer number as the file name

the CUSTOMER NO. cell = I10:J10

i honestly do not know if the code windows are ready for me cause i never 
used them b4...just found out that they were there yesterday...lol

anthing you can do to help would be great!

"JE McGimpsey" wrote:

> One way:
> 
> Put this in your ThisWorkbook code module. Change "A1" to whatever cell 
> you want the date to be entered in, and modify the date format to suit:
> 
>     Private Sub Workbook_Open()
>         With Sheets(1).Range("A1")
>             If IsEmpty(.Value) Then
>                 .NumberFormat = "dd mmmm yyyy"
>                 .Value = Date
>             End If
>         End With
>     End Sub
> 
> Save your template with A1 cleared.
> 
> 
> In article <1135274662.451756.22030@g43g2000cwa.googlegroups.com>,
>  "Ken Zenachon" <imafellow@gmail.com> wrote:
> 
> > I use an Excel invoice to bill clients.
> > Currently I have an Invoice Date field which is populated by the
> > =TODAY() function. That's good. However, if I open the spreadsheet down
> > the road and accidentally recalculate, the Invoice Date field is
> > updated with the current date. That's not so good.
> > 
> > Is there a simple macro I can use that Inserts the date when the
> > document is created and then terminates? Something, I guess, that calls
> > the TODAY() function and then pops the resulting date value into the
> > appropriate cell.
> > 
> > I know I can just use CTRL+; to insert the date manually but I'm
> > shooting for *fewer* things that I can potentially forget when
> > invoicing.
> > 
> > Thanks,
> > 
> > KZ
> 
0
cxlough41 (13)
1/3/2006 10:26:04 PM
Well,  I did as you said but it doesn't seem to work.
Am I supposed to save the worksheet as an XLT template or should just
opening the XLS file with the code in the ThisWorkbook module do the
trick?

KZ

0
imafellow (28)
1/11/2006 9:20:25 PM
Since you don't say what "doesn't seem to work" means, it's hard to 
tell. Is nothing happening? the wrong value being entered? 

The code should be entered in the ThisWorkbook module of the XLT. The 
XLT should have the target cell blank when saved.

In article <1137014425.704770.66690@g47g2000cwa.googlegroups.com>,
 "Ken Zenachon" <imafellow@gmail.com> wrote:

> Well,  I did as you said but it doesn't seem to work.
> Am I supposed to save the worksheet as an XLT template or should just
> opening the XLS file with the code in the ThisWorkbook module do the
> trick?
0
jemcgimpsey (6723)
1/11/2006 10:10:04 PM
Insert the current date and time in a cell

Select a cell and press CTRL+

--
rsen
-----------------------------------------------------------------------
rsenn's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2905
View this thread: http://www.excelforum.com/showthread.php?threadid=49557

0
1/12/2006 3:11:04 AM
Sorry, my answer was a bit vague...
When I first enteredthe formula into my XLS (not XLT) nothing happened
immediately, and nothing happened when I closed and reopened the
document. I'm going to save it as a template and get back to you.
KZ

0
imafellow (28)
1/16/2006 4:24:47 PM
Hey, it works!
:)

Thanks very much.

KZ

0
imafellow (28)
1/18/2006 6:52:00 PM
Reply:

Similar Artilces:

How do I insert Roman Numerals?
New to Word 2007 would someone please explain to me how to insert Roman Numerlas in my document? "ckj" <ckj@discussions.microsoft.com> wrote in message news:6CF0C580-BA6E-463D-B4FD-E6A6FDD9E814@microsoft.com... > New to Word 2007 would someone please explain to me how to insert Roman > Numerlas in my document? Just type them... I II III IV V VI VII VIII IX X XI etc etc. Type a number e.g. 21, select it and run the following macro Dim oRng As Range Set oRng = Selection.Range oRng.Fields.Add oRng, 34, oRng.Text & " \*Roman"...

Office Updates #2
How can one determine what update has previously been accomplished in any Office product? CES <cesalazar@sprintmail.com> wrote: > How can one determine what update has previously been > accomplished in any Office product? Not all files are updated at every update. Check the version number of this file: /Applications/Microsoft Office X/Office/Microsoft Component Plugin It gets updated at every update... Corentin -- - Mac:MS MVP (Francophone) - (MS) MVP: http://support.microsoft.com/default.aspx?ln=FR&scid=fh;FR;mvp Newsgroups produits MS: http://support.micros...

Showing a date field as a number
Hi. I was wondering if there was any way that I could have a column showing the date and time (20/12/2007 06:00:00) and another column show the date and time as a number, (29548). This would be done in a select query, but I am not sure how? Is it possible? Regards AJ AJ, Use format... mm/dd/yy hh:nn:ss for 20/12/2007 06:00:00 Use format... #.0000 (with Decimal Places = to suit your needs) for 39436.2500 Use format... # (with Decimal Places = 0) for 39436 -- hth Al Campagna Microsoft Access MVP http://home.comcast.net/~cccs...

todays date #2
How would I get todays date in an excel spread sheet -- kaushi "Kaushi" <Kaushi@discussions.microsoft.com> wrote in message news:3B5D9B62-D42F-47C2-A04E-A694B19288F8@microsoft.com... > How would I get todays date in an excel spread sheet > -- > kaushi =NOW =NOW() Better (just the date, not the time): =TODAY() Both will update with every recalculation. If that is not what you require: CTRL+; -- Kind regards, Niek Otten Microsoft MVP - Excel "Gordon" <gordonbparker@yahoo.com.invalid> wrote in message news:%23ImVSFZRJHA.3628@TK2MSFTNGP06....

Insert trigger
Looking for some advice on SQL 2005. I have a table that will usually be populated by an SSIS package. I want to set the "loaddate" column to the current time after a record is inserted. Should i do this via trigger or should i just build a step in the SSIS package to update the column after the file loads? If trigger is the way to go, what is the syntax to create the after insert trigger? Thanks in advance. You can create a default constraint on the table set to CURRENT_TIMESTAMP. That will handle the automatic date assignment without any need for coding. -...

how to automatically enable controls' xp theme in a dialog
In the dialog generated with previous version of vc, the controls automatically display as xp theme. But, when i use the newest version of vc and build a dialog,and the controls display as classical windows theme. My question is how to make the controls automatically enable xp theme when the theme is enabled. thanks, best regards, kywoo ...

inserting hrs and minutes
I have a cell in my time card that displays total weekly time -ex- "40:15" is there a way to make it more like this...40hrs,15mins -- Message posted from http://www.ExcelForum.com Use a custom format hh"hrs",mm"mins" -- Regards, Peo Sjoblom "-Brian-H- >" <<Brian-H-.110wgs@excelforum-nospam.com> wrote in message news:Brian-H-.110wgs@excelforum-nospam.com... > I have a cell in my time card that displays total weekly time -ex- > "40:15" is there a way to make it more like this...40hrs,15mins ? > > > ...

Automatic conditional formatting from a list
Hi All I need a macro that colours cells if the product name in column A on it's row matches any in the product list. There is a list of product names in C17:End(xlUp).Row, that have different backgrounds applied to each cell in the list. The macro looks at Column A in the worksheet & compares it to the product name list. Where it finds a product name match, it goes across to columns I:BJ (on the matched row) and applies the product name's background colour to any "active cells" (i.e. value >0). The following code does this but it's applies...

Insert | File > Attachmnet-Button Drop Down ;What is the difference between Insert and Insert As Attachmnet
re: "Outlook2003, File-Insert-Options" On making new-email with Attachment-File(s), ** File Menu | Insert | File >>> (Brows and select File to insert ) then we can see the button "Insert", and write side Drop Down Arrow lower-right side of Dialog Box; If it clicked, we can see three options as follows: ** Insert Insert as text Insert as Attachment I can not recognize/understand the difference between "Insert" and "Insert as Attachment" *** What is the difference between Insert and Insert As Attachment ? I would appreciate y...

Updating a table
I have query that relates to a table and i want to be able to automatically insert a comment into a range. I.E Table column is called Report name. I want to open the query and have it ask me the name of the report. When i enter it i want it to auutomatically enter the name in the column so that all the other information that i add afterweards is associated with the report. I then want this info to save when i exit. Can anybody help? ...

insert an interactive excel file into word web page
I'm trying to insert a excel file into a word document with text, and then save it was as a web page, but I want to keep the excel part interactive. Any ideas? ...

Problem with language and dates in Excel on a Mac
Hi, I've got a problem with excel for Mac - I've tried absolutely everything I can think of and can't seem to fix it... The basic problem is that dates appear in french (specifically, the month name). This is despite the fact that I've set every preference I can find to "English". So 10/07/2006 turns into 10-juil-2006 instead of 10-july-2006. If I look in the language preferences in excel, it's set to English. The language preferences in MaxOSX are also set to English. When I look at the cell format box, it's selected "Date" and the sample form...

Automatic Hyperlinks in Excel
Hi, Does anyone know if it's possible to turn OFF the automatic hyperlinks in Excel? Basically, the cell is holding UNC paths (\\SERVERNAME\PATH1\PATH2 etc). We don't want these to be links, just text entries. It's easy within word (just a check box under auto-correct in the options) but I can't seem to find the option within Excel. Can anyone help? Regards, Mike It was added in xl2002, but if I start my data entry with an apostrophe ('), xl2002 won't convert it to a hyperlink, either. But I think I'd just let xl make them. And wipe them out later with a ...

how to automatically load my function after the ListBox have shown on the screen?
i generate a project based on a dialog. and i insert a ListBox. i need to init some instruments in my programm, so i want to display the init process in the Listbox. how can i load the init function automatically but not spring the function by mouse or keyboard clicking after the Listbox have shown on the screen? You can populate the listbox in OnInitDialog. This is called before the dialog is shown. -- Ajay Kalra [MVP - VC++] ajaykalra@yahoo.com "mark" <qdmahui@hotmail.com> wrote in message news:CE859599-1CE8-4311-B9AB-3C068BE6D078@microsoft.com... > i generate a proje...

Inserting Hyperlinks in a Protected Sheet
Hi I run Excel 2000 and I have a protected worksheet that I share wit users in my organisation. I want to allow the insertion of a hyperlin to a specific file type within a specified directory on our server. 3 Questions: 1.Protection on disables the insert hyperlink command. Can this b overcome with worksheet activate code? 2.Can I limit the types of files (preferably by requiring the file t meet a mask format eg "z-*.xls")? 3.Can I limit the directory that can be linked, by referring to pathname stored in a cell on the active sheet? Would appreciate your suggestions. Thanks S...

todays date
Hi I have a cell that I want to know when something will be finished i.e. today()+30.which gives 02/07/04. This is ok until I open the spreadsheet tomorrow when I will get 03/07/04. How can I get the date 02/07/04 to remain every day or do I just enter the date manually? Thanks tricia Hi Tricia! You've noted that TODAY() is volatile and will change on recalculation if the date has changed. You might prefer entry using: Ctrl + ; -- Regards Norman Harker MVP (Excel) Sydney, Australia njharker@optusnet.com.au Hi Tricia, You would need a macro. If you say you have a cell, you ar...

Insert with a where condition
Hi, sql 2005 I have an insert statement that is ignoring the where condition. That is, I want to insert records when they do not already exist in the destination table. INSERT INTO dbo.tblmnuGroupPerm ( gId ,mtfID ,... ) SELECT @gID ,mtfID ,... FROM dbo.locmnuTabFunction AS ltf WHERE ltf.mtfID NOT IN ( SELECT gp.mtfID FROM dbo.tblmnuGroupPerm AS gp WHERE gp.gId=@gID AND gp.Deleted=0 ) Any ideas or recommendations appreciated :-) Many thanks, Jonathan It's OK... <oops "redFace">I did not correctly se...

Cannot add appointment to a future date
I've tried creating any appt. and Outlook just refuses to add it to the date I requested (August 12, 2005). It adds it with current time for today. This is driving me nuts. I cannot find anywhere on MS KB site on how to solve this. Please help ... somebody ... anybody ... AG Helpful if you provided more information. What version of Outlook and are you using an Exchange server What is the error you are getting or what is happening. Regards, Francine Otterson President, San Diego Outlook User Group "ag" wrote: > I've tried creating any appt. and Outlook just r...

Sent date/time stamp.
Hi is it possible to change the date/time stamp on an email that you have delayed sending? I set a delay of 4 hours on the email, but it showed the date/time stamp that the email was closed/saved etc, can i change/ammend this? many thanks cifulikeit ...

Text wrap does not expand row height automatically.
Cell/row height only shows one line, even if the automatic row is chosen. What seems to be the problem? Help. Frank - Make sure the cells that should cause expanded heights are formated to wrap. -- Daryl S "Frank R" wrote: > Cell/row height only shows one line, even if the automatic row is chosen. > What seems to be the problem? Help. You must set Wrap Text and Row Autofit. BUT.........if you have any merged cells they will not respond to row autofit. Either get rid of them or you will need VBA code to deal with them. See google search thread f...

Insert
I want to overtype in a Publisher text box. I find I can only insert. The "insert" key doesn't do anything. ...

Inbox Email is automatically being moved to Deleted Items
Help - A number of important emails keep getting automatically moved to Deleted Items. I have not set up any rules like this. Is there some setting I can change to ensure this doesn't happen try opening outlook using the resetfolders switch. If you don't know how to do this, see http://www.outlook-tips.net/beginner/switches.htm -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Need Help with Common Tasks? http://www.outlook-tips.net/beginner/ Outlook Tips: http://www.outlook-tips.net/...

how to insert data in a table
Hi Exprets; I am creating an access database in which I want to insert data in already created table. Kindly help. Regards, Vikky Vikky <love.excel@gmail.com> wrote in news:1194124711.012302.269990 @e34g2000pro.googlegroups.com: > Hi Exprets; > > I am creating an access database in which I want to insert data in > already created table. > > Kindly help. > > Regards, > > Vikky > Data from where? Do you want to import it from excel, from a text file, copy it from another table or type it in manually? -- Bob Quintal PA is y I've altere...

How do you insert page numbers larger than 1000?
I have my purchase orders set up as a Publisher document. When our organization upgraded from Publisher 2000 to Publisher 2002, the new version set parameters on the page numbers. This was one of those things that worked just fine in the previous version... Does anyone know how to turn it off or change it? Hi mregen (mregen@discussions.microsoft.com), in the newsgroups you posted: || I have my purchase orders set up as a Publisher document. When our || organization upgraded from Publisher 2000 to Publisher 2002, the new || version set parameters on the page numbers. This was one of those...

insert downloads into power point
i downloaded an application called "BioDigital Simulator" of an animated cleft lip/palate surgery and need it put into my power point presentation, but can't fiugre out how to do so.... very frustrating... What kind of file is this application? Is it a video? If so, what kind? MPEG? AVI? MOV? Or is it an EXE file? Something else? Which version of PPT are you using? -- Echo [MS PPT MVP] http://www.echosvoice.com What's new in PPT 2010? http://www.echosvoice.com/2010.htm Fixing PowerPoint Annoyances http://tinyurl.com/36grcd PowerPoint 2007 Complete Makeover...