How to update cells in a row when a particular cell in the same row is changed
I have a 2 page excel file.
Page 1: "List" page has 6 columns and infinite rows
Column names:
A: Date
B: Symbol, Text
C: Source, =TradeSource
D SignalApp, =INDIRECT($C2,TRUE)
E: Pattern, =INDIRECT($D2,TRUE)
F: Cull Date
"Source, App, Pattern" page has various defined ranges for the appropriate dropdowns.
What I am trying to do is, clear values if a cell value is changed. Have done this in other files but the address of the change is always the same.
I have the following:
When I change any cell in TradeList this Private Sub is activated
Private Sub Worksheet_Change(ByVal Target As Range)
Call Any_Change(Target)
End Sub
and goes to:
Sub Any_Change(ByVal Target As Range)
Dim ColNo As Integer
Dim RowNo As Integer
RowNo = ActiveCell.Row
ColNo = ActiveCell.Column
If ColNo > 5 Or ColNo < 2 Then
End
End If
If ColNo = 3 Then 'Source has changed
Cells(RowNo, 4) = ""
Cells(RowNo, 5) = ""
End If
If ColNo = 4 Then 'Signal App has changed
Cells(RowNo, 5) = ""
End If
End Sub
The problem is that the routine never stops. If I change the value for Source, "If ColNo = 3" is true or SignalApp, "If ColNo = 4" is true,.....
the system loops between List "Private Sub" and the "Any_Change" Sub and never stops.
Any ideas?
Thanks