• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

pulling multiple modules to fulfill a total criteria

A.D

New Member
Hello All!

New to this Forum

I currently have a INDEX+MATCH solution in place that I use to pull out matching criterias.. here is the current setup that I work with:-

Have an excel with two sheets, - Data sheet contains an inventory master of sorts where.. we can see each item being displayed with multiple batches in with each of their own quantities depending on where they're stored.. - Sheet 1 is an order form in which my end user would like to get the exact batch of a product on the basis of two criteria's.. Criterias being - product number and qty match to fullfill..

Formula being used -
Code:
=INDEX(C:R,MATCH(1,(C:C=W3)*(R:R>=Y3)*(D:D>=X3),0),3)

Code:
Data - Current Inventory
Item   Quantity Batch
ABD    10         11223a
ABD    15         24589r
DFG      5         T45678
DFG    67         ghytu8
FGH    10         thnh67
FGH    10         huip78

Code:
Sheet 1 - Order form
Item Quantity Batch
ABD 8            11223a
DFG 4            T45678
DFG 10          ghytu8
FGH 10          thnh67

New requirement:-

As seen above we have multiple batches for a certain product, now currently if the order quantity is higher than whats available within a single stock module.. The report does not pickup the combination of batches to fulfill the request. Could you please advise on what sort of a function I could use in excel where if the order quantity is higher than that of a single inventory module. It should allocate stocks from that module till its limit and then find the next available module. Please see below example of how the new output should look.

Code:
Data - Current Inventory
Item Quantity  Batch
ABD          10  11223a
ABD          15  24589r
DFG            5  T45678
DFG          67  ghytu8
FGH          10  thnh67
FGH          10  huip78

Code:
Sheet 1 - Order form
Item     Quantity    Batch       Quantity picked from Batch
ABD              18    11223a     10
                            24589r       8

DFG                6    T45678       5
                             ghytu8       1

FGH              15     thnh67     10
                             huip78       5

Looking forward to your input!
Thanks!

A.D
 
Try,

upload_2018-4-12_0-11-40.png

FIFO allocation with quantity picked from batch

In H3, copied down :

=INDEX(B$3:B$100,MATCH(G3,C$3:C$100,0))-MAX(MIN(SUMIF(A$2:A3,LOOKUP("zz",E$2:E3),B$2:B3)-SUMIF(E:E,LOOKUP("zz",E$2:E3),F:F),SUMIF(A$2:A3,LOOKUP("zz",E$2:E3),B$2:B3)),0)

Regards
Bosco
 

Attachments

  • FIFO allocation with quantity picked from batch.xlsx
    11.6 KB · Views: 7
Back
Top