Last updated fomula for whole column

Laurens

New Member
Joined
Jun 22, 2012
Messages
1
Dear all,

In a previous post on this forum a formula for creating a "last updated" cell for a certain range of cells is given. For instance, if cells A1 till A3 change, A4 will display: Last updated on: 22-6-2012.

I've changed the formule (in MVB) myself into the range I need. B3 till BZ3 changes A3 will display the date of today. See formula below.
Private a(1) As Variant
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
a(0) = a(1)
a(1) = Range("b3:bz3").Value
End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim i As Integer
If Intersect(Target, Range("b3:bz3")) Is Nothing Then Exit Sub
For i = 1 To UBound(a(0), 1)
If Range("a" & i).Value <> a(0)(i, 1) Then
msg = msg & Date & vbLf
End If
Next
If Len(msg) Then
With Application
.EnableEvents = False
.Undo
Range("a3").Value = msg
.EnableEvents = True
End With
a(1) = Range("b3:bz3").Value
End If
End Sub

Now, here's the question: I want this formule for the whole column. So, if B4 till BZ4 changes, I want A4 to display the date of today, and so on.
What do I have to modify in the formula to achieve that?
I'm looking forward to your responses!


Kind regards,


Laurens
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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