PC Review


Reply
Thread Tools Rate Thread

Date Formula

 
 
Steve
Guest
Posts: n/a
 
      17th Jul 2009
I have a spreadsheet template which has a date cell set up with =Today()
Formula. Simple. The tricky part is I want it so that once I turn the
template into an actual spreadsheet that the next time I open this
spreadsheet to review the data it won't change the date to today's date.

Ways I came up with:

Maybe program the Today formula so that if data is entered into A16 (which
is where data would be entered if spreadsheet was no longer a template) then
don't do Today().

I know there is probably a better way to do this.

Please help! Thank you!
 
Reply With Quote
 
 
 
 
RonaldoOneNil
Guest
Posts: n/a
 
      17th Jul 2009
In your routine that changes it from a template to an actual, copy the data
and pastespecial. E.g. A1 contains =TODAY()

Range("A1").Copy
Range("A1").PasteSpecial xlPasteValues

"Steve" wrote:

> I have a spreadsheet template which has a date cell set up with =Today()
> Formula. Simple. The tricky part is I want it so that once I turn the
> template into an actual spreadsheet that the next time I open this
> spreadsheet to review the data it won't change the date to today's date.
>
> Ways I came up with:
>
> Maybe program the Today formula so that if data is entered into A16 (which
> is where data would be entered if spreadsheet was no longer a template) then
> don't do Today().
>
> I know there is probably a better way to do this.
>
> Please help! Thank you!

 
Reply With Quote
 
Patrick Molloy
Guest
Posts: n/a
 
      17th Jul 2009
in the workbook's Open event:-

Option Explicit

Private Sub Workbook_Open()
with worksheets("sheet1").range("A1")
.value = date
.numberformat="dd-mmm-yy"
end with
End Sub

"Steve" <(E-Mail Removed)> wrote in message
news:B2C5D65F-D4CE-4589-9411-(E-Mail Removed)...
> I have a spreadsheet template which has a date cell set up with =Today()
> Formula. Simple. The tricky part is I want it so that once I turn the
> template into an actual spreadsheet that the next time I open this
> spreadsheet to review the data it won't change the date to today's date.
>
> Ways I came up with:
>
> Maybe program the Today formula so that if data is entered into A16 (which
> is where data would be entered if spreadsheet was no longer a template)
> then
> don't do Today().
>
> I know there is probably a better way to do this.
>
> Please help! Thank you!


 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      17th Jul 2009
> In your routine that changes it from a template to an actual,
> copy the data and pastespecial. E.g. A1 contains =TODAY()
>
> Range("A1").Copy
> Range("A1").PasteSpecial xlPasteValues


Actually there is a simpler way...

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

That will overwrite the formula in A1 with the current value being displayed
in A1.

--
Rick (MVP - Excel)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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 Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
::: Date Comparison Problem or Date Formula or Date Macro ::: infojacques@gmail.com Microsoft Excel Discussion 3 13th Jul 2007 10:08 AM
Create Formula - Add # of Networkdays to a specific start date to find an end date bdicarlo1@yahoo.com Microsoft Excel Discussion 3 9th Jan 2007 12:40 PM
Create Formula - Add # of Networkdays to a specific start date to find an end date bdicarlo1@yahoo.com Microsoft Excel Discussion 0 8th Jan 2007 11:32 PM
Re: Excel Formula to calulate number of days passed from date to date Nick Hodge Microsoft Excel Misc 0 4th Jan 2007 09:17 PM
Re: Excel Formula to calulate number of days passed from date to date Roger Govier Microsoft Excel Misc 0 4th Jan 2007 09:14 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:19 PM.