Hello All,
I referred to the earlier post from 2004 but didn't post my queries due to aging of the thread but my queries as same, so please help .
Earlier Post : https://www.mrexcel.com/forum/excel-questions/67250-counting-number-times-cell-value-changes.html
I tried using the VBA given in the link, but it didn't work in my case.
<tbody>
</tbody>
Please assist.
I used the below codes posted by Derek.
Different approach:
Paste this as the worksheet event:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 1 Then Target.Offset(0, 1).Value = 1
End Sub
Paste this in ThisWorkBook:
Private Sub Workbook_Open()
Columns("B:B").Select
Selection.Copy
Range("C1").Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlAdd, SkipBlanks:=False _
, Transpose:=False
Application.CutCopyMode = False
Columns("B:B").ClearContents
End Sub
I referred to the earlier post from 2004 but didn't post my queries due to aging of the thread but my queries as same, so please help .
Earlier Post : https://www.mrexcel.com/forum/excel-questions/67250-counting-number-times-cell-value-changes.html
I tried using the VBA given in the link, but it didn't work in my case.
A | B | C | D |
Detected Date | Target Date | Actual Date | Time Change Counter |
19-Jan-19 | 23-Feb-19 | 4-Mar-19 | Need incremental counter when value changes in column C<need incremental="" counter="" for="" changed="" to="" cell="" in="" c=""></need> |
<tbody>
</tbody>
Please assist.
I used the below codes posted by Derek.
Different approach:
Paste this as the worksheet event:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Target.Column = 1 Then Target.Offset(0, 1).Value = 1
End Sub
Paste this in ThisWorkBook:
Private Sub Workbook_Open()
Columns("B:B").Select
Selection.Copy
Range("C1").Select
Selection.PasteSpecial Paste:=xlAll, Operation:=xlAdd, SkipBlanks:=False _
, Transpose:=False
Application.CutCopyMode = False
Columns("B:B").ClearContents
End Sub
Last edited: