Last Modified Date & Last Modified Time in a cell

Thanseef M S

New Member
Joined
Apr 16, 2023
Messages
3
Office Version
  1. 2019
Platform
  1. Windows
how to generate Last Modified Date & Last Modified Time in a cell
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Do you want this to be the exact time that you made the last change to any cell in each worksheet in the workbook, the last time that you made any change to any cell in any worksheet in the workbook or the last time that the workbook was saved?
 
Upvote 0
Do you want this to be the exact time that you made the last change to any cell in each worksheet in the workbook, the last time that you made any change to any cell in any worksheet in the workbook or the last time that the workbook was saved?
in a specified cell like this...

Last Modified Dateanswer
Last Modified Timeanswer
 
Upvote 0
Assume that you want to store the date and time in cells B1 and B2 of the 'datetimelog' worksheet and set the formula in these cells to '=NOW()'
and the number format to 'dd/mm/yyyy' and 'hh:mm:ss' respectively.

Copy the folowing code to the ThisWorkbook code module.

VBA Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    
    Worksheets("datetimelog").Range("B1:B2").Calculate

End Sub
 
Upvote 0

Forum statistics

Threads
1,215,909
Messages
6,127,670
Members
449,397
Latest member
Bastbog

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top