Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default 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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 32
Default 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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Formatting Output Range in Combo Box V2 Excel Discussion (Misc queries) 2 February 23rd 09 01:10 PM
vlookup not giving correct output houghi Excel Discussion (Misc queries) 3 July 3rd 08 05:28 PM
vlookup not giving correct output Tom Hutchins Excel Discussion (Misc queries) 1 July 3rd 08 03:21 PM
Combo Box to populate variable output range DougL Excel Discussion (Misc queries) 5 February 1st 08 08:09 PM
Combo Box - format output as time Robert Mark Bram Excel Discussion (Misc queries) 1 December 5th 05 12:30 AM


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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"