Can Excel automatically insert current date in a cell?


Ad

Advertisements

S

steve

In answer to the last sentence you would need to have a macro enabled
workbook with this macro in "ThisWorkbook"

Sub Workbook_Open()
Worksheets("sheet1").Range("a1") = Now()
End Sub

This will automatically enter the date when a workbook is opened

from information at http://www.ozgrid.com/VBA/auto-run-macros.htm

Regards
Steve
 
Ad

Advertisements

R

r.churchillbrowne

Does anyone know of a function that can make Excel automatically insert the current date into a cell when a file is opened up?

ANSWER:

There is a very simple way to do this that doesn't require Macros enabled or VB script. Use the IF function with the date or date & time formula embedded.

=IF(B1=0,"",TODAY()) this will include static date
=IF(B1=0,"",NOW()) this will include static date & time

I use this and it works flawlessly.

good luck.
 

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

Top