Hello,
I have the following code on a worksheet:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 17 Then ValidateLookup Target
End Sub
I also have the following code in Module1
Sub EventEnabler()
Application.EnableEvents = True
End Sub
Sub ValidateLookup(ByVal Target As Range)
Application.EnableEvents = False
Target.Value = Application.WorksheetFunction.VLookup(Target.Value, Range("rangeVal"), 2, 0)
Application.EnableEvents = True
End Sub
This works great!
My question is, I have seven (7) other columns I need to apply this to.
I created the following in module1 underneath the above code:
Sub EventEnablerFunding()
Application.EnableEvents = True
End Sub
Sub FundingLookup(ByVal Target As Range)
Application.EnableEvents = False
Target.Value = Application.WorksheetFunction.VLookup(Target.Value, Range("valFunding"), 2, 0)
Application.EnableEvents = True
End Sub
Which I think is correct, however I am at a loss on how to code the worksheet_change since I have been reading I can only have one sub worksheet_change.
I have tried exit sub, exit, etc but I do not know enough about vba to figure this out.
Thanks
Bookmarks