Combo Box - How to Use Output in Vlookup

O

opieandy

I've created a combo box and linked its output to a cell. I'm using that
cell in a vlookup formula. Using the combo box blows the vlookup formula.

The cell is formatted correctly (as a number), though the number doesn't
line up with the numbers below it (which aren't yet linked to a combo box),
and format painter does not change it to match those cells, so that tells me
there's something screwy about the format, but still not sure why vlookup
won't recognize it.

Any help/thoughts/ideas?

Thanks,

Chris
 
M

Max

Its probably a text number.
You can try an "add zero" to the lookup, eg: = VLOOKUP(A2+0, ...)
which will coerce the text num in A2 to a real num for proper matching
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
 
J

Joel

The combobox produces text, not a number.

in the vlookup put a VALUE function pointing to the linked cell.

=vlookup(Value(A1),.......)
 
D

Dave Peterson

If your linkedcell is A1, try:

=isnumber(a1)

You'll see that the value in that cell is text--that's what the combobox
contains.

If all you have for options in that combobox are numbers (er, text values that
look like numbers), then maybe you could use:

=vlookup(--a1,sheet2!a:b,2,false)

The -- will coerce the text number to a number number.
 
O

opieandy

Everyone - thanks for your help!

Chris

Dave Peterson said:
If your linkedcell is A1, try:

=isnumber(a1)

You'll see that the value in that cell is text--that's what the combobox
contains.

If all you have for options in that combobox are numbers (er, text values that
look like numbers), then maybe you could use:

=vlookup(--a1,sheet2!a:b,2,false)

The -- will coerce the text number to a number number.
 

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

Similar Threads

Combo Box and VLOOKUP 7
Combo box problem 0
VLOOKUP Problem 1
combo box 1
Combo box value does not update in Excel 2007 4
Vlookup result in a message box 10
Combo box result text not number 2
VLOOKUP problem 5

Top