to find the Last Modified cell in excel

lokeshsu

Board Regular
Joined
Mar 11, 2010
Messages
178
Hi all,

Do we have a macro which finds the last modified cell in the excel sheet. if it is there please help us with the code.


Thanks In Advance
Lokesh Sundar :)
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Not sure what you need to do with this, but the following might help

Open up the vb window and click on 'thisworkbook' in the project window

Paste the following code

Code:
Dim ws As Worksheet, rng As Range
 
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    Set ws = Sh
    Set rng = Target
End Sub
 
Sub gotoLastModified()
    on error resume next
    ws.Activate
    rng.Select
End Sub

Now if you use alt-F8 and run the 'thisworkbook.gotolastmodified' module the last modded cell in the sheet will be selected.

HTH
 
Upvote 0
Not sure what you need to do with this, but the following might help

Open up the vb window and click on 'thisworkbook' in the project window

Paste the following code

Code:
Dim ws As Worksheet, rng As Range
 
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
    Set ws = Sh
    Set rng = Target
End Sub
 
Sub gotoLastModified()
    on error resume next
    ws.Activate
    rng.Select
End Sub

Now if you use alt-F8 and run the 'thisworkbook.gotolastmodified' module the last modded cell in the sheet will be selected.

HTH


When the file save and closed. Then reopened 'thisworkbook.gotolastmodified' does NOT go the last modified cell. Only goes last cell where cursor is.

Is there any idea to find the last modified cell (or the cell last inputted any data)?

Thanks and regards.
turist
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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