+ Reply to Thread
Results 1 to 10 of 10

Simple Inventory Tracking Sheet

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

    Simple Inventory Tracking Sheet

    Hi,

    I am making an inventory sheet that will show the date, what recipe is being made that day, and auto calculate the on hand inventory of 5 items for the next day

    I've attached an example sheet for clarification. Using VLOOKUP, I've been able to import the items used from the Recipe tab on my working sheet, but I'm not sure what the best way to calculate the usage based on the inventory date vs. the schedule date will be. My intention was to use the inventory sheet to record an actual inventory once a week and have the rest of the dates calculate based on what the schedule tab was calling for.

    Any suggestions on this? Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Simple Inventory Tracking Sheet

    I wasn't quite clear about which page you wanted the countdown formula on. I think it was "Inventory," so I used the following formula in C2, filled down and right:

    =[@[6/13/2018]]-INDEX(Table1[[Item 1]:[Item 5]],MATCH(VLOOKUP(DATE(YEAR(Table2[[#Headers],[6/13/2018]]),MONTH(Table2[[#Headers],[6/13/2018]]),DAY(Table2[[#Headers],[6/13/2018]])),Table3[[Date]:[Recipe]],2,FALSE),Table1[[Recipe]:[Recipe]],0),MATCH($A2,Table1[[#Headers],[Item 1]:[Item 5]],0))

    I did the same for "Schedule," using the following in C3, filled right and down:

    =C2-VLOOKUP(Schedule!$B2,Table1,MATCH(Table3[[#Headers],[Item 1]],Table1[#Headers],0),FALSE)

    I don't recommend using both of my formulas. I would advise using one, then having the sheet you don't choose take its data from the one you do. Take a look at the attachment to see if it's working as desired:
    Attached Files Attached Files
    If your problem has been solved, please use "Thread Tools" to mark the thread as "Solved".

    If you're grateful for this site's existence and would like to contribute to the community, please consider posting something hilarious in our joke thread:
    https://www.excelforum.com/the-water...ke-thread.html

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

    Re: Simple Inventory Tracking Sheet

    This looks great! Thank you.

    A couple of questions...

    You are correct-my thinking is to have the calculations take place on the inventory sheet. The schedule sheet would then pull that data in from there. If I remember correctly, vlookup only looks in the first column for a match but there is a different function that will look in the first row. I will need to use this function to look for the matching date to import the data correct?

    Also, in my working document I actually have 17 "items" based on the code you provided, I would just need to change it as follows?

    =[@[6/13/2018]]-INDEX(Table1[[Item 1]:[Item 5]],MATCH(VLOOKUP(DATE(YEAR(Table2[[#Headers],[6/13/2018]]),MONTH(Table2[[#Headers],[6/13/2018]]),DAY(Table2[[#Headers],[6/13/2018]])),Table3[[Date]:[Recipe]],2,FALSE),Table1[[Recipe]:[Recipe]],0),MATCH($A2,Table1[[#Headers],[Item 1]:[Item 17]],0))

    I've dragged my table out for 17 items, but I'm getting an error when I try to update the code. Also, it may be necessary to add items in the future. Is there a best practice for doing this?

    Thanks again for all your help!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Simple Inventory Tracking Sheet

    There's an HLOOKUP that functions has a horizontal version of VLOOKUP, searching for the specified value in the first row of the range and returning the result from the specified return row. Alternatively, you can use INDEX/MATCH, roughly like this: INDEX(return range, MATCH(value to look for, range to look in, zero)) in place of either LOOKUP. I prefer the INDEX/MATCH combo, but use what you're comfortable with. As to modifying your formula for 17 items, change the "Item 5"s in the formula to "Item 17" and I think it should work. In your formula in post 3, there's an early "item 5" you missed:

    =[@[6/13/2018]]-INDEX(Table1[[Item 1]:[Item 5]],MATCH(VLOOKUP(DATE(YEAR(Table2[[#Headers],[6/13/2018]]),MONTH(Table2[[#Headers],[6/13/2018]]),DAY(Table2[[#Headers],[6/13/2018]])),Table3[[Date]:[Recipe]],2,FALSE),Table1[[Recipe]:[Recipe]],0),MATCH($A2,Table1[[#Headers],[Item 1]:[Item 17]],0))

    If you're still getting errors, post an attachment with all 17 items incorporated for a better diagnosis.

  5. #5
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Simple Inventory Tracking Sheet

    Maybe Im missing something, but this seems to work, as well...
    =iferror(INDEX(Schedule!$C$2:$G$17,MATCH(--Inventory!B$1,Schedule!$A$2:$A$17,0),MATCH(Inventory!$A2,Schedule!$C$1:$G$1,0)),"")

    Not really sure where/how the Recipe comes in?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

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

    Re: Simple Inventory Tracking Sheet

    Thanks, just now had a chance to take a closer look and I've added an attachment with all of the items included.


    I got the inventory tab working up until the date that I started with, but when I try to add more days I'm getting an error on the added days. Looking at the code the only difference I'm seeing is the date that it is looking for-not sure why this is not working past 6/26. Also when I'm trying to drag out the columns for more dates I'm just repeating the last date rather than auto populating the next day?? Any advice on this?

    I tried to add the index formula in the "schedule" tab to pull the inventory data in but I'm not getting any results back. Can you point me in the right direction here?

    Also, (if I can push my luck) I've added a new feature to add stock to the inventory count. On the new "Inbound" tab, I have columns to capture the material number and quantity to be delivered on specific dates. I would like to add the specified quantity to the matching material number in inventory on the date that it is set to come in. What would be the best way to do that?

    Thanks again for all your help!
    Attached Files Attached Files

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

    Re: Simple Inventory Tracking Sheet

    I'm using the recipe tab to tell the inventory how much of what materials to subtract from the inventory based on what recipe is called for. Is there an easier way? Thanks!

  8. #8
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Simple Inventory Tracking Sheet

    EDIT: The forum's firewall was blocking my post for reasons I can't quite determine, so I added some spaces into the formulas below to bypass the firewall. You can ignore/eliminate those or just pull the proper formulas from the attachment.


    Hopefully I've got it all:

    1) The issue with 6/26 is that there was no recipe chosen on your schedule tab, so the formula couldn't calculate the new totals for that date, nor for any date thereafter. Add a recipe for the day and the problem goes away.

    2) The issue you're having dragging the column for more dates arose because sometimes using tables is more trouble than it's worth. Table headers can't be formulas, so they don't always respond as you might expect to things like dragging. To solve the problem without destroying your table, I went to the "design" part of the ribbon for your table on the inventory tab. Under "design", I unchecked the "Header Row" box, which keeps your table but eliminates the headers in row1. These were easily replaced with a hard date in C1 and =C1+1 in D1, filled right for as far as you like. Your table now as unofficial headers, which can better receive formulas.

    3) The INDEX formula on 'Schedule' needs to use MATCH to find the correct row and column, as I poorly described in post #4 and FDibbins more ably demonstrated in post #5. The following should work in D2, filled right and down:

    =INDEX(Table2[# All],MATCH(D$1,Table2[ [# All] ,[Material ' #]],0),MATCH($A2,Inventory!$1:$1,0))

    4) There are potential formatting issues on your 'inbound' tab - the material you enter on 'inbound' must be a perfect format match for the materials listed on 'inventory', which can be a headache since some of the materials look like numbers. To (hopefully) simplify the issue, I changed the five materials columns on 'inbound' to dropdowns that feed off of the list from 'inventory', which should guarantee a format match. I then went with the following formula in D2 of the inventory tab, filled down and right. The new SUMPRODUCT element should account for the 'inbound' entries.

    =C2-INDEX(Table1[[402449]:[Column2]],MATCH(VLOOKUP(C$1,Table3[[Date]:[Recipe]],2,FALSE),Table1[[Recipe]:[Recipe]],0),MATCH($A2,Table1[[# Headers],[402449]:[Column2]],0))+SUMPRODUCT(Table5[[QTY]:[QTY5]],(Table5[[Material]:[Material5]]=$A2)*(Table5[Date] < =D$1))

    With any luck, that covers at least most of it. Take a look at the attachment to see if it's working as desired:
    Attached Files Attached Files

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

    Re: Simple Inventory Tracking Sheet

    Works great! Thanks so much for your help!

    I've marked this solved but if you're still willing to give me some pointers...

    I'd like to add an "Days On Hand" feature that will calculate the number of days of stock remaining for each item of the recipe (inventory/daily usage of the item) and return the lowest number as the maximum days that a recipe can be ran before running out of one or more of the recipe's items. My plan was to add a column in the "Schedule" tab for each material to calculate this then import the lowest figure of the row into a column labeled "Days on Hand". The calculation columns would then be hidden to clean it up a bit.

    I've added a couple of these columns in the attached example in the highlighted columns.

    Is this the best way to accomplish this or is there an easier way?

    Also, I'd like to create a formatting rule to format the text of a cell green on the "Inventory" tab when inventory is added from the "Inbound" tab. Any advice on this?

    Thanks again for all your help already!
    Attached Files Attached Files
    Last edited by llomax83; 06-16-2018 at 11:03 AM. Reason: updated attachment

  10. #10
    Forum Expert
    Join Date
    05-20-2015
    Location
    Chicago, Illinois
    MS-Off Ver
    2016
    Posts
    2,103

    Re: Simple Inventory Tracking Sheet

    Glad to help!

    First, I spotted an error. The formula in D2 of inventory should be:

    =C2-INDEX(Table1[[402449]:[Column2]],MATCH(VLOOKUP(C$1,Table3[[Date]:[Recipe]],2,FALSE),Table1[[Recipe]:[Recipe]],0),MATCH($A2,Table1[[#Headers],[402449]:[Column2]],0))+SUMPRODUCT(Table5[[QTY1]:[QTY5]],(Table5[[Material1]:[Material5]]=$A2)*(Table5[[Date]:[Date]]=D$1))

    The previous version was calculating the inbound repeatedly.

    For your "Days Left" count, your way should work, but I would advise working from the 'Recipes' tab so you can easily get the info for each recipe. I created a new column to show the first date that each recipe would fail to have the necessary ingredients. This date was calculated with the following formula, array entered (confirmed with Ctrl + Shift + Enter) in B2:

    =SMALL(IF(IFERROR((Table3[Recipe]=[@Recipe])*(Table3[[Recipe]:[Column2]]<0),0),Table3[Date]),1)

    Next to that, I created a column with the remaining number of days that each recipe is scheduled before the fail date, using the following (non-array) in C2:

    =COUNTIFS(Table3[Recipe],[@Recipe],Table3[Date],"<"&[@[Fail Day]])

    For the conditional formatting, just select C2:HT19 on inventory and use the following CF formula:

    =C2>B2

    Experiment with the attachment a bit to see if everything is working as desired:
    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)

Similar Threads

  1. Inventory Tracking
    By padraictrue in forum Excel General
    Replies: 1
    Last Post: 10-19-2015, 08:32 PM
  2. Inventory tracking
    By menty in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-07-2014, 09:06 AM
  3. Tracking Inventory
    By v!ctor in forum Excel General
    Replies: 1
    Last Post: 02-04-2013, 06:29 PM
  4. Excel 2007 : Problem in a simple Inventory Sheet
    By fitkhan in forum Excel General
    Replies: 4
    Last Post: 06-14-2012, 02:01 PM
  5. Simple Inventory sheet
    By chris24 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-17-2010, 12:59 AM
  6. inventory tracking
    By Tizwit in forum Excel General
    Replies: 3
    Last Post: 06-04-2008, 12:39 PM
  7. Help tracking inventory
    By speakers_86 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-28-2006, 11:55 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