Today function

Closed
bibhu - 17 Nov 2015 à 02:00
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 19 Nov 2015 à 11:05
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 12 September 2010 Status Contributor Last seen 27 December 2022 555
19 Nov 2015 à 11:05
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