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 May 15th, 2002, 01:42 PM   #1
smittycft99
Board Regular
 
Join Date: Apr 2002
Posts: 130
Default

First off it works amazing, perfect!
Thank you a million!
I hope to impose on you one more time
I do get the reference from the DB in A3 as your code suggests. And my first imput for the menu goes to A14. The problem is people usually have more than 1 item.
let's say I pull up a database reference in A3
and in A14 I say =A3 then vlookup fills in the appropriate columns
But A15 will be the next item, I can't set that to A3 also. How could I do this?

ORIGINAL POST BELOW
=================================
On 2002-05-15 10:24, smittycft99 wrote:
Below is my original post.
The VLookup is great, but my DB is very large and user's will have to type in the Exact phrase into A1 to get B1,C1,D1 filled in. But for A1 the phrase could be long, ie "Rice Crispies treats". Is there a way for the user to type in Rice and then go to a small drop menu showing all entries in db with "rice", I know you can do data validation (and that the DB has to be in the same worksheet) but then the drop menu would be very long. Any ideas, thanks a million in advance

I have a DB:

Food Item Carbs Prot Fats
cereal 45 15 3
milk 20 20 1
bread 45 13 2

Then on another worksheet
when someone types in "cereal" in A1,
Then B1 gets "45", C1 gets "15", D1 gets "3"

Database is in worksheet: database
Menu is in worksheet: Nutrition Log


--------------------------------------------------------------------------------



I'm changing the sheet name Nutrition Log to NutritionLog here.

Sort you database in Database (db) on the column of the food items. The db seems to run from A to E. I'll assume that the actual data start at row 2.

In G2 enter:

=Nutritionlog!A2

In G3 enter:

=MATCH(Nutritionlog!A2&"*",Database!A:A,0)

In G4 enter:

=MATCH(Nutritionlog!A2&"*",Database!A:A)

In G5 enter:

=ROW(Database!A2)

In NutritionLog insert 2 rows before the rows where you show the data associated with the user choice.

In A1 enter: Enter the first word in cell below

Or something to that effect, so that the user what is expected.

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

=OFFSET(Database!$A$2,Database!$G$3-Database!$G$5,0,Database!$G$4-(Database!$G$3-1),1)

Activate A3.
Activate Data|Validation.
Select List for Allow.
Enter as Source:

=CurList

Activate OK.

I assume there are appropriate look up formulas in B3, C3, and D3.

Aladin
smittycft99 is offline   Reply With Quote
Old May 15th, 2002, 01:55 PM   #2
Aladin Akyurek
MrExcel MVP
 
Aladin Akyurek's Avatar
 
Join Date: Feb 2002
Location: The Hague
Posts: 50,317
Default


On 2002-05-15 12:42, smittycft99 wrote:
First off it works amazing, perfect!
Thank you a million!
I hope to impose on you one more time
I do get the reference from the DB in A3 as your code suggests. And my first imput for the menu goes to A14. The problem is people usually have more than 1 item.
let's say I pull up a database reference in A3
and in A14 I say =A3 then vlookup fills in the appropriate columns
But A15 will be the next item, I can't set that to A3 also. How could I do this?


You need another first word entry point (one different from the first). Using exactly the same proc I described, you create CurList2 which you use in the cell where you allow to make another choice.

But, be warned, you can't do this indefinitely without incurring performance costs.
Aladin Akyurek 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 07:38 AM.


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