You have a Selection Change event handler rather than, what I think you need, a Change event handler.
Add to that, a Selection Change event handler will fire every time you select any cell on the worksheet. You should limit so that, although it will fire when a cell changes, it will only take action if it is one of the cells of interest.
Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rInterest As Range
Set rInterest = Range("AH106", "AH107")
If Intersect(Target, rInterest) Is Nothing Then Exit Sub
Dim found As Boolean
found = False
For Each cell In Range("AH106", "AH107").Cells
If cell.Value = "X" Then
found = True
End If
Next
' seems like the If ... Then ... Else is redundant
If found = True Then
Call GoalSeek_T113
Else
Call GoalSeek_T113
End If
End Sub
'Where the Macro is something along the lines of
'Macro 1
Sub GoalSeek_T113()
Range("AH106").GoalSeek Goal:=0, ChangingCell:=Range("AL108")
Range("AH107").GoalSeek Goal:=0, ChangingCell:=Range("AK108")
End Sub
Bookmarks