If you look at the Sub, whatever selection is make on the sheet should be pass to the replace and replace the current Range("B2")
Code: Select all
Private Sub Worksheet_Change(ByVal Target As Range)
Dim rng As Range: Set rng = Target.Parent.Range("B2, B4")
If Target.Count > 1 Then Exit Sub
If Intersect(Target, rng) Is Nothing Then Exit Sub
Select Case Target.Address
Case "$B$2"
Call Option8(Target.Address)
Case "$B$4"
Call Option8(Target.Address)
End Select
End Sub
Code: Select all
Sub Option8()
StartRow = Application.Match(wsDest.Range("B2"), wsSrc.Range("A:A"), 0)
End Sub