ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Combo Box - How to Use Output in Vlookup (https://www.excelbanter.com/excel-discussion-misc-queries/235849-combo-box-how-use-output-vlookup.html)

opieandy

Combo Box - How to Use Output in Vlookup
 
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


Max

Combo Box - How to Use Output in Vlookup
 
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
---
"opieandy" wrote:
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


joel

Combo Box - How to Use Output in Vlookup
 
The combobox produces text, not a number.

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

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

"opieandy" wrote:

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


Dave Peterson

Combo Box - How to Use Output in Vlookup
 
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.



opieandy wrote:

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


--

Dave Peterson

opieandy

Combo Box - How to Use Output in Vlookup
 
Everyone - thanks for your help!

Chris

"Dave Peterson" wrote:

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.



opieandy wrote:

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


--

Dave Peterson



All times are GMT +1. The time now is 11:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com