What was the Last Cell ?

tim.marsahll

New Member
Joined
Mar 7, 2006
Messages
7
Hello,

I wish to record (for each line), when data in a cell was last updated.

I have the code to print the user who last modified a cell, however I need to trigger the code to execute. And record the information…

I have done this through "selection change".

**************************************************
Private Sub Worksheet_Change(ByVal Target As Range)
'Applies last updated to each line

Sheet14.Cells(ActiveCell.Row - 1, 34) = Now

End Sub
**************************************************

This works OK if the user hits return, but if the user clicks further down the sheet the information is stored against an incorrect line.

I need to use another method to give me the “Last Cell” value…?

Any ideas please…?
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
You already have that - Target is passed to the Change event procedure. Try:

Sheet14.Cells(Target.Row, 34) = Now
 

Forum statistics

Threads
1,137,202
Messages
5,680,145
Members
419,886
Latest member
Pulpboi

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
Top