+ Reply to Thread
Results 1 to 8 of 8

Excel 2007 : Restaurant Menu Problem

  1. #1
    Registered User
    Join Date
    09-17-2011
    Location
    South Wales UK
    MS-Off Ver
    Excel 2007
    Posts
    6

    Restaurant Menu Problem

    Hi clever ones

    I have a spreadsheet (2007) with some conditional formating in a list which details items on a menu in a restaurant. If the user selects any of the steaks, I want to show an extra column adjacent with options for Rare, Medium Rare or Well Done. But I dont want it displayed if users choose non steak meals

    Any help is greatful

    Regards

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967

    Re: Restaurant Menu Problem

    Can you post an example showing what 'selected' means and where you want the new column to appear?
    Martin

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Restaurant Menu Problem

    These are called dependent drop down lists.

    I imagine on your "database" sheet you will list your meals. In an adjacent column next to each meal you could put the name of a "required" set of questions, a name that matches a "named range" you've given to those option elsewhere in your workbook.

    So, if on a LISTS sheet you listed Rare, Medium Rare, Medium, MedWell, Well in cells A1:A5, you would highlight A1:A5 then Insert>Name>Define and name those cells CookTemp.

    You could create other similar lists on that same sheet.

    Then on your MEALS sheet, let's say you listed Entrees in column A. So A2 says "Ribeye Steak". In B2 you would put the name of the "required" instructions CookTemp. Repeat that for any other meals, Entree in column A and CookTemp in Col B if it's required. Probably should put the meal price in column C?

    Now highlight columns A:C on this sheet then Insert>Name>Define and give this whole table a name ofItemTable.

    Now highlight JUST column A with your Entree names and Insert>Name>Define this columns Entrees, and change the RefersTo: to read:

    =OFFSET($A$1,,,COUNTA($A:$A),)

    ...now the Entrees list is a self-expanding dynamic list,

    Now on your MAIN sheet, let's put a drop down in column to make Entree choice. Select A2:20 and open the Data Validation settings, set it to:

    Allow: List
    Source: =Entrees

    Now we've reached your original question, how to make column B show the cooking instructions "IF" needed.

    First, let's create a NAMED FORMULA, to make this easy to use. This step is critical, you have to click on the FIRST cell that will use this named formula, so click on B2 before you do anything else.

    Now open Insert>Name>Define and create a name Required and the RefersTo: should read: =VLOOKUP(B2, ItemsTable, 2, 0).

    Now in A2, select a "meat entree" like Ribeye.
    Now back in B2, open the Data Validation settings and use:

    Allow: List
    Source: =INDIRECT(Required)

    And you should be done. B2 will now show the drop down of cooking instructions if you enter an Entree that has a required list in the ItemsTable.

    Give it a go.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    09-17-2011
    Location
    South Wales UK
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Restaurant Menu Problem

    I have a worksheet that I use for named ranges. One range is called MainMeals and contains three or four items 8 oz Steak, Rib Eye Steak, Spag Bol, Curry etc

    On another sheet called choices I created a conditional list that uses the named range MainMeals.

    Here is the Columns:

    Main Meals Desserts

    The Desserts column works in the same way.
    If the user selects any of the steak options in MainMeals list , I would like an imputbox to prompt them to select how their steak should be cooked. And then to enter that info into the column adjacent to the desserts column.

    Regards Phill

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Restaurant Menu Problem

    You'll need to add more information to your Lists sheet, like what I suggested above.

  6. #6
    Registered User
    Join Date
    09-17-2011
    Location
    South Wales UK
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Restaurant Menu Problem

    Hi JBeaucare

    Im getting lost in the instruction somewhere sorry... My first worksheet I renamed List and on this sheet created a name range for all the cooking types rare, med rare etc. This is the only named range on this page.

    On the next sheet which I called Meals I entered in the A Column a Main Meal heading in A1 and from A2 down entered a variety of main meals. I selected A:C and named the three columns ItemTable

    Then Selected the first column and named the range Entrees with =OFFSET($A$1,,,CountA($A:$A),)

    Then on the same Meals sheet create a dropdown validation list for the column A with source = Entrees

    Then click into B2 and create the Named Formula Required with = VLOOKUP(B2,ITemTable,2,0)

    Then select in the A column an item e.g. Rib Eye Steak

    Then in B2 create a dropdown validation list and set the Source to = INDIRECT(Required)

    Its this last step that I get an error with

    Regards Phill

  7. #7
    Registered User
    Join Date
    09-17-2011
    Location
    South Wales UK
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Restaurant Menu Problem

    Im sorry but this doesnt seem to work.....
    Two Sheets one named Lists and the other Meals.

    Lists contains two columns of data in A and B

    Macaroni Cheese Rare
    Lamb Dinner Medium Rare
    Sirloin Steak Medium
    Rib Eye Steak Medium Well
    Curry Well Done
    Chicken Provencal Crispy

    I Highlighted col A:B and named this range ItemsTable
    Then Highlight just the Meals in A and named the range Entrees and Refers to
    =OFFSET($A$1,,,COUNTA($A:$A),0)

    Then swithching to the Meals sheet I create a validation list source = Entrees which allows me to add meals.

    Then Select B2 and create the named formula Required refers to =VLOOKUP(B2,ItemsTable,2,0)

    Then create a validation dropdown list source = INDIRECT(Required)

    This last step I get an error message 'The Source currently evaluates to an error, do you want to continue?

    Spent a long time ensuring that I was copying out the suggestion. Any ideas please?

    Regards Phill

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Restaurant Menu Problem

    My apologies. The named formula (while B2 is selected) should be:

    =INDIRECT(VLOOKUP(A2, ItemTable, 2, 0))


    And the DV formula for B2 is just:

    =Required

    See attached.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1