MrExcel Message Board

Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

Reply
 
Thread Tools Display Modes
Old Jan 14th, 2002, 12:52 PM   #1
andy-s
Board Regular
 
Join Date: Mar 2002
Posts: 51
Default

Excellent,
this was just what I was looking for also.

The main formula syntax is

VLOOKUP(lookup_value,table_array,col_index_num,range_lookup)

In this case the Table_array is not placed in ascending order, and therefore Range_lookup should be FALSE, and the formula should look like

=VLOOKUP(INDEX(INDIRECT(INDEX(Categories,B4)),E4),INDIRECT(INDEX(Categories,B4)&"List"),2,FALSE)

This works well for me.

andy-s
andy-s is offline   Reply With Quote
Old Apr 13th, 2002, 01:43 AM   #2
edith168
New Member
 
Join Date: Apr 2002
Posts: 6
Default

Dear Mr. Excel,
I got some big problems and really need ur help badly.

I am now developing a list for training course, I need to display 3 fields (1. Course Categories 2. Course Name 3. Duration). Since there are many courses under each category. I would like to use 2 combo box for "Course Categories" & "Course Name" field to list all the information rather than typing it eveytimes.

I got 2 questions:
1. after i selected range & cell link in the combo box, everytime when i select the combo box. It will only display the no. (e.g 1 for selection 1, 2 for selection 2).But what i need is to display the text, how can i do it?

2. How can I interlink the two combo box. like when i choose the category 1, the other combo box will list those courses under category 1? Do I need to write any marco and how to write?

I really appreciate ur help and thank u so much in advance!!!

hope to rec.ur reply soon, many thanks!
edith
edith168 is offline   Reply With Quote
Old Apr 13th, 2002, 04:00 PM   #3
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-04-13 00:43, edith168 wrote:
Dear Mr. Excel,
I got some big problems and really need ur help badly.

I am now developing a list for training course, I need to display 3 fields (1. Course Categories 2. Course Name 3. Duration). Since there are many courses under each category. I would like to use 2 combo box for "Course Categories" & "Course Name" field to list all the information rather than typing it eveytimes.

I got 2 questions:
1. after i selected range & cell link in the combo box, everytime when i select the combo box. It will only display the no. (e.g 1 for selection 1, 2 for selection 2).But what i need is to display the text, how can i do it?

2. How can I interlink the two combo box. like when i choose the category 1, the other combo box will list those courses under category 1? Do I need to write any marco and how to write?

I really appreciate ur help and thank u so much in advance!!!

hope to rec.ur reply soon, many thanks!
edith
Edith,

What follows might meet your needs. It might also require some nerve to implement. It's anycase something that is done using dropdown lists created with data validation. The scheme below has the same logic, but uses the comboboxes created with Toolbars|Forms.

Insert an empty worksheet in your workbook, if you already don't have one. Name this worksheet Admin. Create the following data in A1:G5 (I trust it's similar to your own data).


****** http-equiv="Content-Type" content="text/html; charset=windows-1252">

















































Cat

Cat1

Duration

Cat2

Duration

Cat3

Duration

Cat1

internet

6

word

2

vba

5

Cat2

intranet

10

excel

40

lisp

40

Cat3

html

10

access

40

apl

25

*

e-commerce

25

*

*

*

*






Select A2:A4 , go to the Name Box on the Formula Bar, type Categories, and hit enter.
Select B2:B5, name the selection Cat1 following the foregoing procedure.
Select B2:C5 and name the selection Cat1List.
Select D2:D4 and name the selection Cat2.
Select D2:E4 and name the selection Cat2List.
Select F2:F4 and name the selection Cat3.
Select F2:G4 and name the selection Cat3List.

Activate now another worksheet and name it Main.
Activate the option Toolbars|Forms.
In B4 create a combobox.
Activate Format Control.
Enter as Input range

Categories

and as Cell link

B4.

Activate the option Insert|Name|Define.
Enter Current as name in the Names in Workbook box.
Enter as formula in the Refers to box:

=INDIRECT(INDEX(Categories,Main!$B$4))

Create another combobox in cell E4.
Activate Format Control.
Enter Current as Input range.
Enter E4 as Cell link.

In H4 enter:

=VLOOKUP(INDEX(INDIRECT(INDEX(Categories,B4)),E4),INDIRECT(INDEX(Categories,B4)&"List"),2)

This formula retrieves the course duration that is selected from the second combobox which is a subcategory of the category of course, selected from the first combobox.

Aladin




[ This Message was edited by: Aladin Akyurek on 2002-04-13 15:01 ]

[ This Message was edited by: Aladin Akyurek on 2002-04-13 15:02 ]

[ This Message was edited by: Aladin Akyurek on 2002-04-13 15:03 ]
Aladin Akyurek is offline   Reply With Quote
Old Apr 13th, 2002, 09:48 PM   #4
edith168
New Member
 
Join Date: Apr 2002
Posts: 6
Default

Dear Aladin,
This is exactly what i need to do! Thank you soooo...much for ur big help. You are such a genius!!
Thank you for sharing your knowledge to others!
Take Care & Have a nice day!
=) edith
edith168 is offline   Reply With Quote
Old Apr 14th, 2002, 08:54 PM   #5
MrExcel
.
 
MrExcel's Avatar
 
Join Date: Feb 2002
Location: Akron, Ohio USA
Posts: 789
Default

April 14th
__________________
Preview my latest book for Free
MrExcel is offline   Reply With Quote
Old Apr 24th, 2002, 11:17 PM   #6
edith168
New Member
 
Join Date: Apr 2002
Posts: 6
Default

thank you very much for ur previous, it was great. However, there are still another problem and hope u could help me.

When I follow your steps in creating the combox, it works and the two combox able to link together. However, problem comes out when creating several row of these kind of combo box.

(refer to ur prevoious data)

I have created a combobox in next row B5.
Activate Format Control.
Enter as Input range "Categories".
and as cell link B5.

Activate the option Insert/Name/Define.
Entered "Current1" as name in workbook box.
Enter as formula in the Refer to box:

=INDIRECT(INDEX(Categories,Main!$B$5))

Create another combobox in cell E5.
Activate Format Control.
Enter "Current1" as Input range.
Enter E5 as Cell Link.

*****However, an ERROR MESSAGE OF "REFERENCE IS NOT VALID" comes out****

Do u know what is the reason?

Please help me to solve this problem, hope to receive ur reply soon.
edith168 is offline   Reply With Quote
Old Apr 25th, 2002, 12:05 AM   #7
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default

Quote:
On 2002-04-24 22:17, edith168 wrote:
thank you very much for ur previous, it was great. However, there are still another problem and hope u could help me.

When I follow your steps in creating the combox, it works and the two combox able to link together. However, problem comes out when creating several row of these kind of combo box.

(refer to ur prevoious data)

I have created a combobox in next row B5.
Activate Format Control.
Enter as Input range "Categories".
and as cell link B5.

Activate the option Insert/Name/Define.
Entered "Current1" as name in workbook box.
Enter as formula in the Refer to box:

=INDIRECT(INDEX(Categories,Main!$B$5))

Create another combobox in cell E5.
Activate Format Control.
Enter "Current1" as Input range.
Enter E5 as Cell Link.

*****However, an ERROR MESSAGE OF "REFERENCE IS NOT VALID" comes out****

Do u know what is the reason?

Please help me to solve this problem, hope to receive ur reply soon.
In row 5 I created another pair of linked comboboxes, but I couldn't replicate the problem you describe. Re-check format control properties of the comboboxes you created. I can send you a copy of the WB if you want to.

Aladin
Aladin Akyurek is offline   Reply With Quote
Old Apr 25th, 2002, 12:22 AM   #8
edith168
New Member
 
Join Date: Apr 2002
Posts: 6
Default

Hi! Aladin,
It will be grate if u will able to send me the example. my email address is edith168@hotmail.com
thank you so much!
Edith
edith168 is offline   Reply With Quote
Old Apr 25th, 2002, 12:23 AM   #9
edith168
New Member
 
Join Date: Apr 2002
Posts: 6
Default

Hi! Aladin,
It will be grate if u will able to send me the example. my email address is edith168@hotmail.com
thank you so much!
Edith


Quote:
On 2002-04-24 23:05, Aladin Akyurek wrote:
Quote:
On 2002-04-24 22:17, edith168 wrote:
thank you very much for ur previous, it was great. However, there are still another problem and hope u could help me.

When I follow your steps in creating the combox, it works and the two combox able to link together. However, problem comes out when creating several row of these kind of combo box.

(refer to ur prevoious data)

I have created a combobox in next row B5.
Activate Format Control.
Enter as Input range "Categories".
and as cell link B5.

Activate the option Insert/Name/Define.
Entered "Current1" as name in workbook box.
Enter as formula in the Refer to box:

=INDIRECT(INDEX(Categories,Main!$B$5))

Create another combobox in cell E5.
Activate Format Control.
Enter "Current1" as Input range.
Enter E5 as Cell Link.

*****However, an ERROR MESSAGE OF "REFERENCE IS NOT VALID" comes out****

Do u know what is the reason?

Please help me to solve this problem, hope to receive ur reply soon.
In row 5 I created another pair of linked comboboxes, but I couldn't replicate the problem you describe. Re-check format control properties of the comboboxes you created. I can send you a copy of the WB if you want to.

Aladin
edith168 is offline   Reply With Quote
Old Apr 25th, 2002, 12:24 AM   #10
edith168
New Member
 
Join Date: Apr 2002
Posts: 6
Default

Hi! Aladin,
It will be grate if u will able to send me the example. my email address is edith168@hotmail.com
thank you so much!
Edith
edith168 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT -4. The time now is 02:22 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
All contents Copyright 1998-2012 by MrExcel Consulting.
diabetic desserts recipes recipes Diabetic Soups Holiday Pizza Recipes Popcorn Recipes Recipes For Microwave Pasta Recipes Casserole Recipes Chili Recipes Curry Recipes Crockpot Recipes Apples Recipes Bread Recipes Vegetarian Recipes Vegetable recipes Desserts Recipes Appetizers Ethnic Recipes Meat Dishes Barbecue Recipes Sauces Recipes Marinade Recipes Low Fat Recipes Frugal Gourmet Kitchen Classics Recipes On The Grill Cook Books Seafood Recipes Cajun Recipes Breads Low Fat Low Fat Breads Bread Machine Recipes Yeast Breads Quick Breads Fat Free Vegetarian Salad Recipes Eggplant Recipes Radish Recipes Tomato Recipes Jalapeno Recipes Potato Recipes Lettuce Recipes Cabbage Recipes Beans Ambrosia Recipes Biscotti Recipes Desserts Low Fat Cookie Recipes Cheesecake Recipes Cake Recipes Pie Recipes Muffin Recipes Custard Recipes Best Appetizers Appetizers Low Fat Salsa Recipes Dip Recipes International Recipes Afghan Recipes Alaska Recipes French Recipes German Recipes Greek Recipes Italian Recipes Spanish Recipes Thai Recipes Korean Recipes Chinese Recipes Mexican Recipes Indian Recipes Beef Recipes Pork Pork & Ham Pork Butts Pork Chop Recipes Pork Ribs Rulled Pork Poultry Recipes Stews Recipes Ground Beef Barbecue Grill Barbecue Smoker All Purpose Sauce BBQ Sauce Barbecue Sauce Carolina BBQ Sauce Pickle Recipes Marinades Smoking Low Fat Appetizers & Dips Low Fat Breakfast Low Fat Cakes Low Fat Cheesecakes Low Fat Cookies Low Fat Desserts Low Fat Fish & Seafood Low Fat Meats Low Fat Pasta Low Fat Pies Low Fat Salads Low Fat Sandwiches Low Fat Sauces & Condiments Low Fat Sides Low Fat Soups Low Fat Vegetarian Baker's Dozen Taste of Home Recipe Book Bon Appetit Cookbook Blacktie Cookbook Buster Cook Book Cookbook USA Cook Book Cook Book Sara's Cookbook Sara's Cookbook Appetizers and Dips Poultry recipes Diabetic recipes Holiday recipes Miscellaneous recipes 110 recipes 1986 Usenet cookbook 2900 recipes Cyberrealm recipes Great sysops of world Specialty recipes Ceideburg recipes Cheese recipes Chili recipes Fruits recipes Garlic recipes Great chefs of NY Londontowne recipes Raisins recipes Recipes for kids US Food Vegetarian recipes Bread recipes Drinks Meat Dishes Brisket recipes Caribou recipes Chicken recipes Filet mignons recipes Pork recipes Swordfish recipes Turkey recipes Pasta recipes Uncategorized recipes Ethnic recipes Canada recipes English recipes Ethiopia recipes Germany recipes Greece recipes Mexican recipes Philippines recipes Welsh recipes Microwave recipes Soups recipes Vegetable recipes Asparagus recipes Barley recipes Brown rice recipes Lentil recipes Mushrooms recipes Salads recipes Wild rice Desserts recipes Cakes recipes Chocolate recipes Cookies recipes Ice cream recipes