+ Reply to Thread
Results 1 to 6 of 6

Automatic cost calculation based on pull-down menu

Hybrid View

  1. #1
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    Automatic cost calculation based on pull-down menu

    Hi,
    I'm making food cost calculations and would like to make my life more simple.

    I have one sheet with the list of ingredients and their prices:

    Screen Shot 2015-09-12 at 4.34.58 pm.png

    On another sheet I have a pull-down of those ingredients and would like the cost (Column G)
    to be calculated automatically based on the prices above, when I enter the weight in Column E

    Screen Shot 2015-09-12 at 4.35.53 pm.png

    Any Advice?

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Automatic cost calculation based on pull-down menu

    You can do some changes to link the price into the dropdown (in a second column) but to be honest I would just use a lookup table to look the price up based on the item youve selected.

    Highlight your table of ingredients (including the prices) and give it a name (eg Ingredients) then in column G you would use the formula
    =VLOOKUP(D2,Ingredients,2,False) * E2
    which will look for the Ingredient youve selected in the Ingredients table and then return the 2nd column of that row before multiplying it by the quantity. What youve not said though is how the quantities are held in comparison to price for Lasagne Sheets you need 500g and calculate the cost at 12.00. is that a single 500g pack for 12.00 each or 5 100g packs? at 2.40 each?

    What Im trying to say (poorly) is that if the quantity is 1,2,3 (units) etc then its straight forward but you dont seem to have any mention of what a unit consists of in your ingredients.

    ps how big is this Lasagne? 2000 litres of milk???????
    If someone has helped you then please add to their Reputation

  3. #3
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    Re: Automatic cost calculation based on pull-down menu

    hahaah 10 points for spotting the deliberate mistake.

    BTW, All prices in the Ingredients sheet are per kg
    Last edited by roger55; 09-12-2015 at 10:35 AM.

  4. #4
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    Re: Automatic cost calculation based on pull-down menu

    OK, I highlighted the Ingredients and Price Column, and defined it as Ingredients:

    Screen Shot 2015-09-12 at 6.41.01 pm.png

    Then I used your formula:

    Screen Shot 2015-09-12 at 6.41.35 pm.png

    As you see, getting #N/A

  5. #5
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Automatic cost calculation based on pull-down menu

    Is your list in alpha order?

    On reflection it could be better to use INDEX and MATCH

    MATCH will find the row that contains your data so if you have your Ingredients list in Columns A and B then use
    =MATCH(D406,A:A,0)
    to return the row that contains your item.

    Link this to INDEX and you get your price
    =INDEX(B:B,MATCH(D406,A:A,0),0,1)
    which tells it to return Column B for the row you found in the match

  6. #6
    Registered User
    Join Date
    09-12-2015
    Location
    Dubai
    MS-Off Ver
    15.13.1
    Posts
    25

    Re: Automatic cost calculation based on pull-down menu

    that works very well !
    now let me see if I can understand how exactly :/

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Cost total based off of selection on drop-down menu
    By dreamsteve in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 04-21-2014, 05:12 PM
  2. Annual cost calculation based on date
    By sekharyadav in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-13-2013, 06:51 AM
  3. Annual cost calculation based on changes.
    By sekharyadav in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-21-2013, 01:30 AM
  4. Calculation Fuel cost automatic
    By yukioh in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-25-2013, 10:05 PM
  5. Cost calculation based on more than one variable
    By sstepro in forum Excel General
    Replies: 8
    Last Post: 01-06-2012, 08:58 AM
  6. Cost Driver calculation - Looking for formula/macro to calculate manpower cost alloca
    By Swastik Banerje in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-30-2009, 11:18 AM
  7. Pull down menu and calculation
    By jvanderm in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2007, 05:03 AM

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