Automatic Date Update Based on Changes Made to Spreadsheet

wgalstin4

New Member
Joined
Dec 22, 2016
Messages
5
Hello,

I'm just wondering if anyone know of a way for the date in a cell to automatically update to today's date only if a change has been made to any part of the spreadsheet?

In my spreadsheet, cell D4 is the 'Date of last update' - I would like this cell to change to today's date if any other part of the spreadsheet is changed. If I just open the doc but I don't make any changes, I would like the date to stay the same as it was previously.

I think from searching elsewhere this can be done with VBA but I have no experience in this area at all so I was hoping someone could show me a way this could be done just using formulas if possible.

Any help appreciated.

Many thanks, Warren.
 

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
Hi,

I'm not completely sure but doing this with formula's is almost impossible.
However this short VBA code, copied on "thisworkbook" section in the VBA editor will do the trick.
Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
   If Target.Address <> "$D$4" Then
        Cells(4, 4) = Date
    End If
End Sub
 
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,952
Members
448,535
Latest member
alrossman

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