named ranges - changing ranges with month selected
I've rather lost the plot with some of your detail below, but if your data
validation cell (displaying the months) is in Cell E1, then in the Worksheet
Module (right-click the tab & select View Code)
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$E$3" Then
Sheets(Target.Value).Activate
End If
End Sub
Note the Data Validation Values must ve spelt exactly as the Tab (Sheet)
names.
In each monthly sheet module, use the Activate event to fire the update of
your ranges (that's the bit I can't quite get to grips with - sorry........)
--
HTH
Roger
Shaftesbury (UK)
"gr8guy" wrote in message
...
hi,
I have a workbook containing a worksheet called Scorecard which is
actually
a performance score (weightage) for agents for a particular month.
i have entered formulas & named ranges by which the formulas extract data
using VLOOKUP & named ranges from sheet2 & there is a 3rd sheet sheet3
called Key which gives the weightage for agents performance falling in
between a particular level.
like agent promises taken score is between 300 to 350, weightage will be 8
351 to
400, weightage will be 10
& so on & on.
the above is just to give an overview of what i have made.
There is a data validation listbox (using Data menu Validation, select
List, give a name range e.g. =months)
what i want to do is selecting the month from the data validation list
e.g.
April, the "april" sheet should get activated & the defined ranges will
get
updated for that sheet & automatically the formulas on scorecard will show
the correct data for April month. similarly, if May is selected from list,
May sheet will get activated & named ranges will update themselves with
the
ranges in may sheet & eventually Scorecard sheet will reflect the data for
may.
Can anybody help me with this?
Eijaz
|