Hello,
I am trying to find a formula to pull the first date an item becomes negative in a set of data. I've been trying index and match together but cant seem to get it to work. I know that using the min function to find the earliest date will but the same date on all the repeated item numbers and that's ok. What we are working on is a report to tell us when to move in a purchase order for that item if the due date is larger than the date the item goes negative. Below is an example of the data set I am working with. With Col A being the item number, Col I being the field I want the date returned, and Col P being the range where the OH qty would turn negative, and COL J being the qty at the first negative date.
I would be looking for COL I for the first item 01-31951-000 to show 05/24/17 in COL I and the qty 63 to be in COL J.
Thank you, please let me know if you need any other information. I would really appreciate any help with this, I have been working on this for a few days now and I am stuck.
[TABLE="width: 1214"]
<colgroup><col width="135" style="width: 101pt;"> <col width="83" style="width: 62pt;"> <col width="95" style="width: 71pt;"> <col width="64" style="width: 48pt;"> <col width="135" style="width: 101pt;"> <col width="170" style="width: 128pt;"> <col width="102" style="width: 77pt;"> <col width="75" style="width: 56pt;"> <col width="89" style="width: 67pt;" span="2"> <col width="76" style="width: 57pt;"> <col width="87" style="width: 65pt;"> <col width="160" style="width: 120pt;"> <col width="59" style="width: 44pt;"> <col width="71" style="width: 53pt;"> <col width="77" style="width: 58pt;"> <col width="51" style="width: 38pt;"> <tbody>[TR]
[TD="width: 135, bgcolor: transparent"]Textbox18[/TD]
[TD="width: 83, bgcolor: transparent"]SUPPLYQTY1[/TD]
[TD="width: 95, bgcolor: transparent"]DEMANDQTY1[/TD]
[TD="width: 64, bgcolor: transparent"]MRPTYPE[/TD]
[TD="width: 135, bgcolor: transparent"]ORDERNUMBER1[/TD]
[TD="width: 170, bgcolor: transparent"]Item[/TD]
[TD="width: 102, bgcolor: transparent"]RELEASEDATE_I[/TD]
[TD="width: 75, bgcolor: transparent"]DUEDATE[/TD]
[TD="width: 89, bgcolor: transparent"]Move in Date[/TD]
[TD="width: 89, bgcolor: transparent"]Move in Qty[/TD]
[TD="width: 76, bgcolor: transparent"]SUPPLYQTY[/TD]
[TD="width: 87, bgcolor: transparent"]DEMANDQTY[/TD]
[TD="width: 160, bgcolor: transparent"]STSDESCR[/TD]
[TD="width: 59, bgcolor: transparent"]MOVEIN[/TD]
[TD="width: 71, bgcolor: transparent"]MOVEOUT[/TD]
[TD="width: 77, bgcolor: transparent"]CANCELLED[/TD]
[TD="width: 51, bgcolor: transparent"]PAB[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]IV[/TD]
[TD="bgcolor: transparent"]MAIN[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1/1/1900[/TD]
[TD="bgcolor: transparent, align: right"]7/9/2016[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]387[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"]On Hand[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]387[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]SOP[/TD]
[TD="bgcolor: transparent, align: right"]4003777[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1/1/1900[/TD]
[TD="bgcolor: transparent, align: right"]5/19/2017[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]150[/TD]
[TD="bgcolor: transparent"]Order [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]237[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]SOP[/TD]
[TD="bgcolor: transparent, align: right"]4010189[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1/1/1900[/TD]
[TD="bgcolor: transparent, align: right"]5/24/2017[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]150[/TD]
[TD="bgcolor: transparent"]Order [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]87[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]SOP[/TD]
[TD="bgcolor: transparent, align: right"]4010245[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1/1/1900[/TD]
[TD="bgcolor: transparent, align: right"]5/24/2017[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]150[/TD]
[TD="bgcolor: transparent"]Order [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]-63[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]POP[/TD]
[TD="bgcolor: transparent"]PO193294[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]3/9/2017[/TD]
[TD="bgcolor: transparent, align: right"]5/26/2017
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]850[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"]Firm [/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]787[/TD]
[/TR]
</tbody>[/TABLE]
I am trying to find a formula to pull the first date an item becomes negative in a set of data. I've been trying index and match together but cant seem to get it to work. I know that using the min function to find the earliest date will but the same date on all the repeated item numbers and that's ok. What we are working on is a report to tell us when to move in a purchase order for that item if the due date is larger than the date the item goes negative. Below is an example of the data set I am working with. With Col A being the item number, Col I being the field I want the date returned, and Col P being the range where the OH qty would turn negative, and COL J being the qty at the first negative date.
I would be looking for COL I for the first item 01-31951-000 to show 05/24/17 in COL I and the qty 63 to be in COL J.
Thank you, please let me know if you need any other information. I would really appreciate any help with this, I have been working on this for a few days now and I am stuck.
[TABLE="width: 1214"]
<colgroup><col width="135" style="width: 101pt;"> <col width="83" style="width: 62pt;"> <col width="95" style="width: 71pt;"> <col width="64" style="width: 48pt;"> <col width="135" style="width: 101pt;"> <col width="170" style="width: 128pt;"> <col width="102" style="width: 77pt;"> <col width="75" style="width: 56pt;"> <col width="89" style="width: 67pt;" span="2"> <col width="76" style="width: 57pt;"> <col width="87" style="width: 65pt;"> <col width="160" style="width: 120pt;"> <col width="59" style="width: 44pt;"> <col width="71" style="width: 53pt;"> <col width="77" style="width: 58pt;"> <col width="51" style="width: 38pt;"> <tbody>[TR]
[TD="width: 135, bgcolor: transparent"]Textbox18[/TD]
[TD="width: 83, bgcolor: transparent"]SUPPLYQTY1[/TD]
[TD="width: 95, bgcolor: transparent"]DEMANDQTY1[/TD]
[TD="width: 64, bgcolor: transparent"]MRPTYPE[/TD]
[TD="width: 135, bgcolor: transparent"]ORDERNUMBER1[/TD]
[TD="width: 170, bgcolor: transparent"]Item[/TD]
[TD="width: 102, bgcolor: transparent"]RELEASEDATE_I[/TD]
[TD="width: 75, bgcolor: transparent"]DUEDATE[/TD]
[TD="width: 89, bgcolor: transparent"]Move in Date[/TD]
[TD="width: 89, bgcolor: transparent"]Move in Qty[/TD]
[TD="width: 76, bgcolor: transparent"]SUPPLYQTY[/TD]
[TD="width: 87, bgcolor: transparent"]DEMANDQTY[/TD]
[TD="width: 160, bgcolor: transparent"]STSDESCR[/TD]
[TD="width: 59, bgcolor: transparent"]MOVEIN[/TD]
[TD="width: 71, bgcolor: transparent"]MOVEOUT[/TD]
[TD="width: 77, bgcolor: transparent"]CANCELLED[/TD]
[TD="width: 51, bgcolor: transparent"]PAB[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]IV[/TD]
[TD="bgcolor: transparent"]MAIN[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1/1/1900[/TD]
[TD="bgcolor: transparent, align: right"]7/9/2016[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]387[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"]On Hand[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]387[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]SOP[/TD]
[TD="bgcolor: transparent, align: right"]4003777[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1/1/1900[/TD]
[TD="bgcolor: transparent, align: right"]5/19/2017[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]150[/TD]
[TD="bgcolor: transparent"]Order [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]237[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]SOP[/TD]
[TD="bgcolor: transparent, align: right"]4010189[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1/1/1900[/TD]
[TD="bgcolor: transparent, align: right"]5/24/2017[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]150[/TD]
[TD="bgcolor: transparent"]Order [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]87[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]SOP[/TD]
[TD="bgcolor: transparent, align: right"]4010245[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]1/1/1900[/TD]
[TD="bgcolor: transparent, align: right"]5/24/2017[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent, align: right"]150[/TD]
[TD="bgcolor: transparent"]Order [/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]-63[/TD]
[/TR]
[TR]
[TD="bgcolor: transparent"]01-31951-000[/TD]
[TD="bgcolor: transparent, align: right"]2,737[/TD]
[TD="bgcolor: transparent, align: right"]2,550[/TD]
[TD="bgcolor: transparent"]POP[/TD]
[TD="bgcolor: transparent"]PO193294[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]3/9/2017[/TD]
[TD="bgcolor: transparent, align: right"]5/26/2017
[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]850[/TD]
[TD="bgcolor: transparent, align: right"]0[/TD]
[TD="bgcolor: transparent"]Firm [/TD]
[TD="bgcolor: transparent"]X[/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent"][/TD]
[TD="bgcolor: transparent, align: right"]787[/TD]
[/TR]
</tbody>[/TABLE]