+ Reply to Thread
Results 1 to 2 of 2

Calculating and Displaying "Days on Hand" from Inventory Sheet

  1. #1
    Registered User
    Join Date
    04-08-2014
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    57

    Calculating and Displaying "Days on Hand" from Inventory Sheet

    With help from this forum, I've been working on an inventory sheet to schedule and track multiple ingredients used in several recipes.

    This sheet contains 3 tabs that I'm currently working with...

    The "Recipe" tab which contains the list of recipes and how much of each ingredient the recipe uses.
    The "Schedule" tab which contains the date and the user input of what recipe will be produced that day.
    The "Inventory" tab which the user inputs the starting inventory. This tab will then calculate the remaining inventory based on how much of each ingredient is used by the recipe that was produced on any given day.

    On the "Schedule" tab, the remaining inventory of each ingredient is pulled from the "Inventory" tab and displayed. My goal is to add a "Days on Hand" feature that will display the maximum number of days that the scheduled recipe can be produced before one or more of its ingredients' inventory drops below 1. (In the attached example this column is highlighted in red)

    My current plan was to add a column behind each ingredient column that would calculate the days remaining of each ingredient with the following formula: (These are highlighted light blue in the example)

    =IF(VLOOKUP([@Recipe],Table1[#All],2,1)>0, [@402449]/VLOOKUP([@Recipe],Table1[#All],2,0),[@402449])

    If the recipe calls for an ingredient, the days on hand for that ingredient will be calculated by taking the inventory/the amount the recipe calls for, otherwise just the existing inventory... (this is where I think my problem is)

    Then run a MIN function in the "Days on Hand" column. The problem that I'm running into is that if the inventory of an ingredient is 0, the MIN function will still pick it up even if the scheduled recipe doesn't call for that ingredient. I am looking for a formula that will only consider the ingredients that have a value greater than 0 for each recipe in the "Recipe" tab.

    Hopefully the attached example can be more descriptive. Thanks for any help!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Calculating and Displaying "Days on Hand" from Inventory Sheet

    If I understand correctly you want the minimum number of days as opposed to the minimum inventory. If that is correct this might be a consideration:
    1) Modify the formula in D2 (and down) to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    2) Modify the formula in E2 (and down) to read: =D2/VLOOKUP($B2,Table1,(COLUMN()-1)/2,0)
    3) Select D2 and E2 and drag the fill handle over to O2,
    4) Select F2:O2 and double click the fill handle to copy down.
    5) Modify the formula* in C2 to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    *Denotes and array entered formula which needs to be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.
    Note that when you have added the rest of your "Calc" columns you should modify the formula further to accommodate all columns on the 'Schedule' sheet.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Days of Inventory on Hand Calculation
    By njsdca in forum Excel General
    Replies: 7
    Last Post: 03-10-2021, 01:55 PM
  2. "Master/Slave" Excel Inventory sheet
    By AngryFrontBear in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-25-2018, 04:02 PM
  3. [SOLVED] Calculating number of days from "today" and assigning a value of 0, 1, 2 or 3
    By Hedy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-12-2018, 07:55 AM
  4. Replies: 3
    Last Post: 11-23-2015, 01:49 PM
  5. [SOLVED] Formula Help - Displaying "days" after
    By jmacavali in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-17-2013, 02:43 AM
  6. Code for Inventory spreadsheet to add/subtract "on hand" amounts
    By DKS in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2011, 02:49 PM
  7. Merging a "physical count" to a "system on-hand"
    By raharms in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-20-2010, 04:43 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