View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Mangesh Yadav[_4_] Mangesh Yadav[_4_] is offline
external usenet poster
 
Posts: 101
Default Handling Combo boxes...

I have one data
range with Apple, Onion, etc, but when I select from the dropdown, it
displays the number (1, 2, etc). Is it possible for me to display a
different text on the basis of my selection? Or is there any other
method?



Use the combobox from the control toolbox menu (View Toolbars Control
Toolbox)


But, I want to display a text in the adjoining cell, corresponding to
the menu item that is selected. for e.g Suppose a person selects
"Apple" from the dropdown, the adjoining cell should show "Fruit".


If you have 2 ranges, 1 for the fruits, and the other for the vegetables,
just do a match, and the one which does not return an error, is the one you
should use. Example:
A1:A10 are fruits, and B1:B10 are veg.
You are entering a value in C1 (either apple or onion), and in D1 you want
"Fruits" or "Veg" accordingly.
Enter the following in D1:
=IF(ISNUMBER(MATCH(C1,A1:A10,0)),"Fruit","Vegetabl e")




Mangesh




"sujeshn" wrote in
message ...

Hello,
I have a workbook with some data. I plan to put in a combobox here, so
that the users select only predetermined values. I have done this also.
But, I want to display a text in the adjoining cell, corresponding to
the menu item that is selected. for e.g Suppose a person selects
"Apple" from the dropdown, the adjoining cell should show "Fruit". If
someone selects "Onion", it should display "Vegetable". I have one data
range with Apple, Onion, etc, but when I select from the dropdown, it
displays the number (1, 2, etc). Is it possible for me to display a
different text on the basis of my selection? Or is there any other
method?

Pls do let me know.

Sujesh


--
sujeshn
------------------------------------------------------------------------
sujeshn's Profile:

http://www.excelforum.com/member.php...o&userid=25256
View this thread: http://www.excelforum.com/showthread...hreadid=387463