You don’t need a macro:
In the cell type “=now()” (without quotes) and this will give u the date and time. It will also update.
If you are looking for macro:
ActiveCell.FormulaR1C1 = "=NOW()"
And then assign the macro to a button or menu item.
Hope this helps!
Schmidtw answerd very clearly. The only thing I may add is:
NOW() provides date & time. If you need only the time then Format the cell accordingly – h:mm AM/PM; h:mm; h:mm:ss , etc, (Excel 2007).
Good luck & enjoy Excel- ing!!!
The answer sounds good but there is catch here… Everytime you open the workbook it will refresh the book with new time…
Dim i, j
i = ActiveCell.Row
j = ActiveCell.Column
ActiveSheet.Cells(i, j) = Time