Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Whats the best way for combo box? 2

Status
Not open for further replies.

DarkOne72

Technical User
Jun 14, 2002
210
US
Hello,
I have a combo box that you can select the certain sizes (i.e. 24" x 50 yd) I need to know if I should use a Vlookup or an IF statement for what I am needing.
Once you select the size in the combo list I want it to return a certain value in a another field but as you all know the combo list has a number behind the box which does not match the text in the lookup field.
So I can get this IF to work

=IF(P5=16,B19,"")
but it also has to have IF(P5=12,13,14,15,etc and based on that number goto a different cell instead of B19.

I hope this makes since; kind of hard to explain.

Thanks for your help
 
Use a control toolbox Combobox instead of a Forms toolbar combobox.

Cheers, Glenn.

Beauty is in the eye of the beerholder.
 




"the combo list has a number behind the box which does not match the text in the lookup field."
[tt]
The VALUE: =INDEX(ValueRange,FormsComboboxValue, 1)
[/tt]


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Ok I used the control combo box and setup the values but how do I get the different values for each selection to go into another field.
For example in cell P5 is the dropdown list of 24" x 10 yds, 24" x 25 yds, and 24" x 50 yds. If I select 24" x 10 yds I want it to show the value of cell B19 in cell R5 if it is 24" X 25 yds I want the value of cell b20 to show up in R5 etc..

Thanks
 




Check out Data > Validation -- LIST for the range of cells in column B that you mentioned. Each selected value is right in the cell.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Yes that is correct, I do see the value of the selection made in the drop down but once one is selected and need the cell next ot it to show value from another cell based on the selection you made: example

Drop Down selection Value based on selection
----------------------------------------------------
24" X 10 yds 82.50 <---From diff cell
24" X 25 yds 93.00
24" X 50 yds 106.00

So in short you control combo box worked great showing the exact name from what you select instead of a number!!!
However, the second part I need is to have it where if you select certain dropdown selections it gives you result in another cell based on that selection; like a price for specific yardage.
 





Use the Value in the selection in a LOOKUP function to return the value you want; either VLOOKUP or INDEX & MATCH.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
OK I finally got it to work, I don't understand why my vlookup didn't work but when I used the wizard instead of manually typing it it gave me the correct values.
thank you again for all of your help guys.

Thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top