VBA Time stamp based on formula value change

rvalizan

New Member
Joined
Mar 10, 2014
Messages
1
Hello,

I have looked everywhere I feel like for a solution to my problem. I have never worked with VBA before, and am having trouble finding a solution for my problem.

I have a range of cells, "D:F", in which I need a time stamp to be placed in column "I" on the event of any of the formula values changing in any of those range of cells.

I was able to get a change event to work, but not the way I want. I cannot figure out how to properly set up a calculation event.

I tried this solution but it has syntax errors and is not working. Maybe you can kind of see what i'm trying to do here.
Code:
Private Sub Worksheet_Calculate()Static OldVal()
    If Target, Range("f:f") <> OldVal() Then
        Cells(Target.Row, 9) = Date
        OldVal() = Range("F:F").Value
    End If
End Sub

Thank you ahead of time for any solutions you may be able to provide me.
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,223,708
Messages
6,174,002
Members
452,542
Latest member
Bricklin

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