I have created a worksheet that uses two comboboxes to generate a chart based on the values that have been selected and this is working well. However i would like to use the INDIRECT/SUBSTITUTE function to display specific values based on the selection of a combobox. I have used the INDIRECT function before using the validation list option but i want to use it with a combobox, can anyone help me/provide me with some advice on how to do this?
My workbook at present:
Last edited by PRodgers; 09-02-2009 at 05:31 AM.
Can you elaborate with an example of what you mean?
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
NBVC i basically want two comboboxes one "Hospital" and the other "Ward", i want when i user selects a hospital only the wards in this hospital are available. The above workbook that I posted is the same kind of idea of what i want but i want to use the INDIRECT/SUBSTITUTE function to restrict what is being displayed in the comboboxs, im unsure how to use this function within a combobox. Any help/advice is much appreciated.
Create a named range for the dynamic range.
So If, for example on your attached example you have the Vehicle combobox and say you have different combinations of fuel types based on vehicle chosen.. so now you would have separate named ranges for Motorcyle, Car, Bus, etc. listing the fuel types....
Then you can use the B2 result (which displays the choice of vehicle you made in a cell)... and name a range, eg. DynamicRange and use formula =Indirect($B$2)
Now, the Fuel combobox, input range would be DynamicRange
I did a quick sample on the attached...
Microsoft MVP - Excel
Where there is a will there are many ways. Pick One!
Please read the Forum Rules
If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below
Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.
Preferred Charities: Lupus Canada and Sick Kids Foundation.
Feel Free to Donate if you want to, for the assistance you received today.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks