(now) changes when opened how do keep it from changing in excel

T

tankerman

I use (NOW) to insert the date and time on some of my spreadsheets but the
date and time changes every time I reopen the sheet, is there some way of
having the date and time auto inserted without changing every time the sheet
is opened up. My sheets need a beginning date and time but when reopened for
addational input the date and time change and I need it to stay the same as
when started
 
M

Marcelo

Hi Tankerman,

did you try to copy and paste special values, before save?

hth
regards from Brazil
Marcelo

"tankerman" escreveu:
 
J

JLatham

Put this code in the workbook's _Open event:

Private Sub Workbook_Open()
If Worksheets("Sheet1").Range("A1") = "" Then
Worksheets("Sheet1").Range("A1") = Now()
End If
End Sub

Change the sheet name and cell address as needed for your workbook. You can
find detailed instructions on how to get into the VB Editor and get to the
workbook's code module here:
http://www.jlathamsite.com/Teach/WorkbookCode.htm
 
V

VBA Noob

Otherwise if you don't use paste special you have to enter this eac
time

Current date and time

Select a cell and press CTRL+; then SPACE then CTRL+SHIFT+;

unless you use a macro.

VBA Noo
 
G

Gord Dibben

Manually you can enter a static date by CTRL + ;

Static time by CTRL + SHIFT + ;


Gord Dibben MS Excel MVP
 
Top