Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 'This program will analyze an excel spreadsheet for a change in a specific column
- 'and then update subsequent cells
- 'pre-built function that analyzes changes in cells
- Sub Worksheet_Change(ByVal Target As Range)
- 'declare range variables
- Dim WatchRange As Range
- Dim IntersectRange As Range
- 'set the ranges
- Set WatchRange = Range("D:D")
- Set IntersectRange = Intersect(Target, WatchRange)
- 'conditional to execute code if change occurs
- If IntersectRange Is Nothing Then
- 'Do Nothing
- Else
- Call MyCustomFunction
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement