Hello All,
I'm working on a first in first out orders vs inventory spreadsheet.
<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]Crop[/TD]
[TD="align: center"]Item[/TD]
[TD="align: center"]Qty[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Item[/TD]
[TD="align: center"]Order Date[/TD]
[TD="align: center"]Qty[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]10[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/1/2019[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]20[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/2/2019[/TD]
[TD="align: center"]30[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]30[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/3/2019[/TD]
[TD="align: center"]90[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]40[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/4/2019[/TD]
[TD="align: center"]70[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]50[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/5/2019[/TD]
[TD="align: center"]40[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]60[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/6/2019[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]70[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/7/2019[/TD]
[TD="align: center"]80[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]80[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/8/2019[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]90[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/9/2019[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]100[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/10/2019[/TD]
[TD="align: center"]60[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]5[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]1/11/2019[/TD]
[TD="align: center"]32[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]8[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]1/12/2019[/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]25[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]1/13/2019[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]32[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]1/14/2019[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]16[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]1/15/2019[/TD]
[TD="align: center"]5[/TD]
</tbody>
So hopefully this simplified sample data will work.
Inventory Data
Columns A,B,C Represent inventory data with a crop serial number (column A), Item Number (column B) and crop quantity (Column C).
Crop serial numbers (column A) are unique and are date based so that lower number means earlier date = older crop.
Order Data
Columns E, F G are orders we have against the inventory in the first three columns.
Again, we have Item number (column E), Ship date (column F), Quantity ordered (column G)
My goal is to identify the oldest crop number that will have a quantity available for a given order if we fill these orders using oldest crops to fill earliest orders for a given item.
So for the order for Item A going out on 1/6/19, my desired formula would return "12" because all crops of Item A Older than (lower crop number than) 12 are needed for earlier shipping orders. (Adding all orders before 1/6 totals 280. Crops before 12 for column A total 240)
The orders and the Inventory are actually on separate sheets of the same workbook and are different lengths.
Neither the orders nor the crops will always be sorted by date. There are some dates where multiple orders of the same item will ship. At this point I am just looking for the oldest crop that will have any inventory left at a given order date before anything ships on that date.
Somehow I feel like I've done something like this before, but can't quite put my finger on it...
Thanks in advance!
I'm working on a first in first out orders vs inventory spreadsheet.
A | B | C | D | E | F | G | |
---|---|---|---|---|---|---|---|
<tbody>
[TD="align: center"]1[/TD]
[TD="align: center"]Crop[/TD]
[TD="align: center"]Item[/TD]
[TD="align: center"]Qty[/TD]
[TD="align: center"][/TD]
[TD="align: center"]Item[/TD]
[TD="align: center"]Order Date[/TD]
[TD="align: center"]Qty[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]10[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/1/2019[/TD]
[TD="align: center"]50[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]20[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/2/2019[/TD]
[TD="align: center"]30[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]30[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/3/2019[/TD]
[TD="align: center"]90[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]40[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/4/2019[/TD]
[TD="align: center"]70[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]50[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/5/2019[/TD]
[TD="align: center"]40[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]60[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/6/2019[/TD]
[TD="align: center"]100[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]70[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/7/2019[/TD]
[TD="align: center"]80[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]80[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/8/2019[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]10[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]90[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/9/2019[/TD]
[TD="align: center"]20[/TD]
[TD="align: center"]11[/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]100[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]1/10/2019[/TD]
[TD="align: center"]60[/TD]
[TD="align: center"]12[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]5[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]1/11/2019[/TD]
[TD="align: center"]32[/TD]
[TD="align: center"]13[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]8[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]1/12/2019[/TD]
[TD="align: center"]25[/TD]
[TD="align: center"]14[/TD]
[TD="align: center"]7[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]25[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]1/13/2019[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]9[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]32[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]1/14/2019[/TD]
[TD="align: center"]8[/TD]
[TD="align: center"]16[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]16[/TD]
[TD="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=000000]#000000[/URL] , align: center"][/TD]
[TD="align: center"]C[/TD]
[TD="align: center"]1/15/2019[/TD]
[TD="align: center"]5[/TD]
</tbody>
Sheet1
So hopefully this simplified sample data will work.
Inventory Data
Columns A,B,C Represent inventory data with a crop serial number (column A), Item Number (column B) and crop quantity (Column C).
Crop serial numbers (column A) are unique and are date based so that lower number means earlier date = older crop.
Order Data
Columns E, F G are orders we have against the inventory in the first three columns.
Again, we have Item number (column E), Ship date (column F), Quantity ordered (column G)
My goal is to identify the oldest crop number that will have a quantity available for a given order if we fill these orders using oldest crops to fill earliest orders for a given item.
So for the order for Item A going out on 1/6/19, my desired formula would return "12" because all crops of Item A Older than (lower crop number than) 12 are needed for earlier shipping orders. (Adding all orders before 1/6 totals 280. Crops before 12 for column A total 240)
The orders and the Inventory are actually on separate sheets of the same workbook and are different lengths.
Neither the orders nor the crops will always be sorted by date. There are some dates where multiple orders of the same item will ship. At this point I am just looking for the oldest crop that will have any inventory left at a given order date before anything ships on that date.
Somehow I feel like I've done something like this before, but can't quite put my finger on it...
Thanks in advance!