ComboBoxes and Formulas

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
 
F

Frank Isaacs

You shouldn't need to do anything special. Are you saying the LinkedCell
isn't linking properly?

Try doing something simple like =A2 in some other cell, and see if it
changes as you change the selection in the ComboBox.
--
HTH -

-Frank
Microsoft Excel MVP
Dolphin Technology Corp.
http://vbapro.com
 
E

Excel User

Thanks, Frank.

Simple references do come through; but, for example, if
the LinkedCell is B2 and the following formula is in C2:
=IF(ISNA(MATCH(B2,range,0)),"",VLOOKUP(B2,range,2) the
formula does not recognize the value in the LinkedCell
(B2). Is there something in the Properties box I need to
do?

I appreciate your help.

EU
 
D

Dave Peterson

There must be some mismatch between your value and the value in range. (In your
formula, you wrote range. You actually have the address or a named range in
there--and in the match portion, you want that to be one column wide.)

Do you have extra spaces (leading/trailing/embedded) in one of them?

And what data do you show in your combobox. I put the numbers 1 through 10 in
A1:A10 and used that as the listfillrange.

The linked cell showed the correct number, but it was text. Is your key value a
numeric entry. If yes, then you could coerce your text number to number number
with something like:

match(--b2,range,0)

The double negative will make excel convert text numbers to number numbers.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top