+ Reply to Thread
Results 1 to 10 of 10

Matching Material Costs to Production in Chronological Order

  1. #1
    Registered User
    Join Date
    04-03-2014
    Location
    Rotherham
    MS-Off Ver
    Excel 365
    Posts
    24

    Matching Material Costs to Production in Chronological Order

    Hi all,

    This isn't a specific formula question, but an open question on how I might attack a work project I've been given.

    I work in a factory and wish to create a sheet which, as automatically as possible, assigns price per kg to each kg of Finished Product made. The complexity then comes from having many products which use several materials at once, the order of consumption (the date when production used the material) and the varying price points of stock.

    The one core assumption I would need to follow is that the OLDEST stock delivered into site is the FIRST stock to be selected for use in production at any given time.

    I've created a simple example to demonstrate what I would need and expected outcomes - do you guys think of a methodology (I'm not afraid of formulas!) to attribute cost of materials for each Finished Goods kg in a automated or semi-automated fashion?

    Any advice would be great, Jonny
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-27-2007
    Location
    New Jersey, USA
    MS-Off Ver
    2013
    Posts
    1,669

    Re: Matching Material Costs to Production in Chronological Order

    I know that this can be done efficiently with VBA. In fact, that would be best because you can scale it to larger database.
    However, just using formulas and some helper columns, you can get the same results [although somewhat cumbersome to setup].

    Take a look at the attached file.
    I have created helper cells I20:AA29.

    The setup is calculating sugar used and what's left from each batch of delivery.
    Hopefully, you'll be able to follow the logic. If you have questions, let me know.
    Attached Files Attached Files
    1. Click on the * Add Reputation if you think this helped you
    2. Mark your thread as SOLVED when question is resolved

    Modytrane

  3. #3
    Registered User
    Join Date
    04-03-2014
    Location
    Rotherham
    MS-Off Ver
    Excel 365
    Posts
    24
    Thank you for the response! I'm happy to learn the VBA nessacary for this process if it provides the most efficent method - its not my strong point but whatever works best.

    How would you suggest using VBA here?

    Thanks again

  4. #4
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Matching Material Costs to Production in Chronological Order


  5. #5
    Registered User
    Join Date
    04-03-2014
    Location
    Rotherham
    MS-Off Ver
    Excel 365
    Posts
    24

    Re: Matching Material Costs to Production in Chronological Order

    Thanks for the link Tim - Im finding it quite tricky to Google the right terms when searching for this!

    Ill review the link and see if I can understand!

    Thanks again

  6. #6
    Registered User
    Join Date
    04-03-2014
    Location
    Rotherham
    MS-Off Ver
    Excel 365
    Posts
    24

    Re: Matching Material Costs to Production in Chronological Order

    Hi all,

    I've seen the suggested approach on Tim's link, but my very limited knowledge of VBA means I can't read / adapt the VBA code to match my needs.

    Would anyone with a understanding of the VBA being used in Tim's link be able to explain to me specifically how I would tailor the VBA to my workbook, and ideally explain the principles behind the VBA?

    Thanks in advance!

  7. #7
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Matching Material Costs to Production in Chronological Order

    one more udf
    Attached Files Attached Files

  8. #8
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,183

    Re: Matching Material Costs to Production in Chronological Order

    This may be useful ....
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-03-2014
    Location
    Rotherham
    MS-Off Ver
    Excel 365
    Posts
    24

    Re: Matching Material Costs to Production in Chronological Order

    Thanks for the feedback everyone

    Tim - on your workbook, I can see the macro is working perfectly - I'm still trying to understand the macro, even with your notes I'm struggling.

    I had a question on the workbook though - if I wanted to take this to the next level, which would be having multiple ingredients both on the production table and the stocks table, is this relatively straightforward within the macro as it exists or does it require alot more work?

    Appreciate the help everyone

  10. #10
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Matching Material Costs to Production in Chronological Order

    Not a lot, but a bit

+ 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. Replies: 0
    Last Post: 06-17-2017, 12:53 AM
  2. [SOLVED] Rows automatically in chronological order
    By Nico Zottos in forum Excel General
    Replies: 2
    Last Post: 12-12-2014, 12:18 AM
  3. Data Entry duplicated in chronological order
    By kosti in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-29-2014, 07:27 AM
  4. [SOLVED] Loop thru files in chronological order
    By cokillerliu in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-02-2013, 10:02 AM
  5. obtain chronological order without sorting
    By Diamant in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 08-21-2012, 12:18 AM
  6. [SOLVED] Re-Arranging Numbers to be in Chronological Order
    By rlpowers in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-27-2012, 10:21 PM
  7. How to arrange your tabnames in alphabetical / chronological order
    By Dbase Beginner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-18-2005, 09:12 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