Forum Discussion

Pcesarrt26's avatar
Pcesarrt26
Copper Contributor
Jan 31, 2022
Solved

Show date of modification to one cell

I have a set list of items and need to have a column that shows when the last time the cell next to it was modified. In the attached example column A will always be the same, column B will be modified periodically . I need column C to show the date of last modification of each items in column B. I know this can be achieved with VBA but have not really worked with VBA much. Column A will mostly likely have ~5k items in it 

 

      • OliverScheurich's avatar
        OliverScheurich
        Gold Contributor

        mychellVALEC 

        Private Sub Worksheet_Change(ByVal Target As Range)
        
        Dim rngBereich As Range
        
        Set rngBereich = Range("B2:B2500")
        
        If Not Application.Intersect(Target, rngBereich) Is Nothing Then
        
        If Target.Value <> " " Then
        Target.Offset(0, 1).Value = Date
        Else
        
        End If
        
        End If
        
        End Sub

        This is done with the Worksheet_Change event and these lines of code.

Resources