ComboBoxes and Formulas

  • Thread starter Thread starter excel user
  • Start date Start date
E

excel user

How do I get a formula to recognize a selection from a
Combo Box that I created from the Control Toolbox?

For example, if the LinkedCell is A2 and the formula in B2
uses the chosen value in A2 as the reference for a VLOOKUP
formula, what do I need to do to make the value in A2
recognizable to the formula in B2?

Do I have to do anything in Properties, or enter something
in the VBE?

Thanks.

EU
 
1. In a worksheet formula you have to use the linked cell to index
your range of values thus :-
=INDEX(H1:H6,A2,1)

2. In a macro you can get the selected value directly with something
like :-
MyValue = ActiveSheet.ComboBox1.Value

Use of *Controls toolbox* controls in a worksheet is not recommended
because they are extremely prone to bugs. Use those from the *Forms*
toolbox in preference. In this case you can only use the INDEX()
method to get the selected value.


Regards
BrianB
==================================================
 
Back
Top