Today function

Closed
bibhu - Nov 17, 2015 at 02:00 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 19, 2015 at 11:05 AM
Hi,

i am using today function in excel, i don't want change the date, when i open other day, it should show the previous date.


Thanks
Bbbp
Related:

1 response

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Nov 19, 2015 at 11:05 AM
Hi Bbbp,

If you don't wnat the date to change you can:
  • Manually enter date.
  • Copy the date cell and use paste special > values only.
  • Use a macro and create shortcut for it.


The last option is probably the one you are looking for.
- Open Visual Basic by hitting Alt+F11.
- Goto top menu > Insert > Module and paste the following code in the big white field:
Sub RunMe()
ActiveCell.Value = Format(Now, "dd-mm-yyyy")
End Sub

- Close Visual Basic
- Back at Excel open the Macro list by hitting Alt+F8.
- Select RunMe and click Options
- Choose your shortcut.
- Click OK then Cancel.
- Now select a cell and hit the shortcut and today's date should appear as value.

Best regards,
Trowa
0