I have a query regarding data validation drop down list:
- there are two data validation drop down lists and each of these lists are on seperate sheets in the same workbook.
- there are macros assigned to each specific drop down list.
Example:
In a sheet named "Total"
there is a drop down list containing five selections:
e.g Belguim,France,Ireland,Italy and Spain
and each selection is linked to a macro(s).The target address of the drop down list is "D2".If France is selected from the drop down list its' specific macro automatically runs.
In a sheet named "All Service lines"
there is a drop down list containing five selections:
e.g Tax,Advisory,Insurance,Human Capital,Restructuring
and each selection is linked to a macro(s).The target address is"D2".If Tax is selected then its' specific macro will run.
The code I used so far is:
Private Sub Worsheet_SelectionChange(ByVal Target As Range)
If Target.Address = "$D$2" Then
If Target = "Belguim" Then
macro 1
ElseIf Target = "France" Then
macro2
and so on
EndIf
EndSub
Regards
William Robertson
Bookmarks