Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need help building a macro that displays date/time in active cell
|
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Need help building a macro that displays date/time in active cell
Here is a macro to do what you asked for...
Sub InsertDateTime() ActiveCell.Value = Now ActiveCell.NumberFormat = "mmm d, yyyy - h:mm:ss AM/PM" End Sub Note that unlike the worksheet function NOW(), the date/time entered into the active cell by this code will be fixed at the date and time the code was executed. -- Rick (MVP - Excel) "MSUser" wrote in message ... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Run a macro in active cell only. Want to place current date/time. | Excel Worksheet Functions | |||
How do I use NOW so that each cell displays a different time? | Excel Worksheet Functions | |||
FORMAT A CELL TO USE MO/DATE WITH NO YEAR:,DISPLAYS 1900? | Excel Discussion (Misc queries) | |||
Cell converts a date entry to "=" and displays "01/00/00 | Excel Worksheet Functions | |||
Formula window displays correct answer while cell displays incorre | Excel Worksheet Functions |