Results 1 to 4 of 4

Thread: Date Function

  1. #1
    ricky10
    Guest

    Date Function

    Can anybody help?

    I have created a quote spreadsheet. Obviously I want to assign a date to that quote. To automatically do this I use the formula =TODAY(). Now I save that quote. If I want to go back to that quote in the future. It will obviously change that date to the day I view it. Therefore the question I ask is: Does anybody know a formula I can use that will issue today's date for the quote but when I save it, keep that quotes date. Is it possible? Thanks in advance! Ricky

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Function

    Ricky: There are a number of things that you can do, depending on how you are using this "spreadsheet". The easiest would be to insert the date manually into the cell by selecting the cell and pressing Ctrl/; (hold the Ctrl key down and press the semi-colon). The only other choice that I know of without writing some VBA code is to use the forula you have already tried, but then manually copy the cell and do a Paste/Special/Values to replace the formula with the value. However, that takes more actions than just entering the date with Ctrl/;.

    If you want to automate this, then you will need some VBA code. If you are using the "spreadsheet" as a template, then you can attach this code to the NewWorkbook event, and have the code place the date into the appropriate cell. If you are simply opening the spreadsheet, then you would attach the VBA code to the Workbookopen event. The code would have to check the cell where you want the date to see if it already contains a date, and if it does not then insert the date.
    Legare Coleman

  3. #3
    ricky10
    Guest

    Re: Date Function

    Thanks. Unless anyone else has a suggestion I will probably use Control & ;. When the spreadsheet is opened I will get it to automatically default to that cell. Once again thanks and if anyone else has any other alternatives then please keep me posted.

  4. #4
    Plutonium Lounger Leif's Avatar
    Join Date
    Dec 2000
    Location
    U.K.
    Posts
    14,010
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Date Function

    You could add this to the worksheet:

    Private Sub Workbook_Open()
    If Cells(1, 1) = "" Then Cells(1, 1) = Date$
    End Sub

    where Cells(1,1) is where you want the date.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •