Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Formula
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! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Formula
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! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Formula
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" wrote in message ... 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! |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Date Formula
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 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create a formula in a date range to locate a specific date - ecel | Excel Discussion (Misc queries) | |||
Excel Formula to calulate number of days passed from date to date | Excel Discussion (Misc queries) | |||
Formula for determining if two date columns fall within specific date range | Excel Worksheet Functions | |||
Formula for determining if two date columns fall within specific date range | Excel Discussion (Misc queries) | |||
formula to calculate future date from date in cell plus days | Excel Worksheet Functions |