KillerQueen
New Member
- Joined
- Dec 29, 2021
- Messages
- 2
- Office Version
- 2016
- Platform
- Windows
Hello!
I have an excel file containing a collection of costs and what I would like to do is to have a timestamp updated in cell B2, whenever the total sum of cost is updated in B4. B4 contains a SUMIFS formula to add all the information entered in that sheet. Now I searched highs and lows for a VBA code since im not good at it, and while i managed to get some of them to work, excel cannot seem to recognize whenever the sum changes - without me somehow manually clicking on cell B4.
Anyone that has any idea on how to get this to work?
This was the latest code I got to print a date; A timestamp would be nice as well but I'm more concerned with the fact that im referencing a cell that contains a formula which seems to be an issue.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B4")) Is Nothing Then
With Range("B2")
.Value = Date
.EntireColumn.AutoFit
End With
End If
End Sub
I have an excel file containing a collection of costs and what I would like to do is to have a timestamp updated in cell B2, whenever the total sum of cost is updated in B4. B4 contains a SUMIFS formula to add all the information entered in that sheet. Now I searched highs and lows for a VBA code since im not good at it, and while i managed to get some of them to work, excel cannot seem to recognize whenever the sum changes - without me somehow manually clicking on cell B4.
Anyone that has any idea on how to get this to work?
This was the latest code I got to print a date; A timestamp would be nice as well but I'm more concerned with the fact that im referencing a cell that contains a formula which seems to be an issue.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B4")) Is Nothing Then
With Range("B2")
.Value = Date
.EntireColumn.AutoFit
End With
End If
End Sub