(Today) function can you make it stick

  • Thread starter Thread starter B. E. Smith
  • Start date Start date
B

B. E. Smith

Is there a way to use the (TODAY) function so that is saves in a saved as
worksheet as text.

Here's what I'm after. I have a protected sheet that I do deal calculations
on, that I save as "the deal" once I reach an agreement with my customer.

Is there a way for the date to save on the "saved as" file as text so that
the date doesn't change from that point forward?

In other, After I save the file as the customers final deal. How do I make
the date remain the same hence forward automatically?

Thanks to anyone that can help.

Brian
 
Brian,

You can manually convert the formula to a fixed date entry by pressing F2
then F9 then Enter.

The VBA equivalent is

Range("A1").Value = Range("A1").Text

You could set up a macro to do the SaveAs after it has fixed the date.
 
Brian,

If your not using VBA just copy and paste special (Values)

Using VBA here are some options.

If you already have some code runining insert this where appropriate.

Range("A3") = Format(Now(), "mm/dd/yyyy")


Another option would be to simply copy and then paste as a value after you
save.
code would look something like this.

Sub Macro1()
With Range("A3")
.Copy
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End With
End Sub


A little better solution would be to make it reusable on any active cell and
tie this to a key function.

Drop the following code into a VBA code module.

Sub SaveDateAsText()
With ActiveCell
.Copy
.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
End With
End Sub


Then go to tools/Macro/macros,,,
click the macro SaveDateAsText
click options
enter a Key to asign macro to.

Click OK and lose the macro Dialog.


Now you can click in any cell and press ctr-(key) combination to run your
macro.

Hope this helps
gary M.
 
John Green wrote
You can manually convert the formula to a fixed date entry by pressing F2
then F9 then Enter.

Cool. I can use that.

Always learning,
David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top