MarkReddell
Board Regular
- Joined
- Sep 1, 2011
- Messages
- 210
- Office Version
- 365
- Platform
- Windows
- Mobile
I have several actions that need to be done within a worksheet change scenario. The Problem is that the whole macro runs instead of just the part that needs to work because of a cell change & it also goes into a loop or something. How do I run only the part of macro that needs to instead of ALL of macro? Here is what I'm trying to run:
Can anyone help me with this??? Thanx!!!
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "A1" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A2" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A3" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A4" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A5" And Target.Value <> "" Then Call SORT_LIST
If Range("A17").Value = "YES" Then Call SHOW_TERMS_ONLY
If Range("A17").Value = "NO" Then Call DONT_SHOW_TERMS_ONLY
If Target.Address <> "$B$2" Then Exit Sub
Application.Run Target.Value
End Sub
Can anyone help me with this??? Thanx!!!
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "A1" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A2" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A3" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A4" And Target.Value <> "" Then Call SORT_LIST
If Target.Address(False, False) = "A5" And Target.Value <> "" Then Call SORT_LIST
If Range("A17").Value = "YES" Then Call SHOW_TERMS_ONLY
If Range("A17").Value = "NO" Then Call DONT_SHOW_TERMS_ONLY
If Target.Address <> "$B$2" Then Exit Sub
Application.Run Target.Value
End Sub