How to pull the date an item becomes first negative based on item number

Jhammon2

New Member
Joined
May 6, 2017
Messages
2
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]
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Is this what you want?

Here I am assuming that you have more than one type of item in col A.


Unknown
ABCDEFGHIJKLMNOPQ
1Textbox18SUPPLYQTY1DEMANDQTY1MRPTYPEORDERNUMBER1ItemRELEASEDATE_IDUEDATEMove in DateMove in QtySUPPLYQTYDEMANDQTYSTSDESCRMOVEINMOVEOUTCANCELLEDPAB
201-31951-0002,7372,550IVMAIN01/01/0007/09/165/24/2017-633870On Hand387
301-31951-0002,7372,550SOP400377701/01/005/19/20175/24/2017-630150Order237
401-31951-0002,7372,550SOP401018901/01/005/24/20175/24/2017-630150Order87
501-31951-0002,7372,550SOP401024501/01/005/24/20175/24/2017-630150Order-63
601-31951-0002,7372,550POPPO19329403/09/175/26/20175/24/2017-638500FirmX787
Sheet20
Cell Formulas
RangeFormula
I2{=INDEX(H$2:H$6,MATCH(1,($A2=$A$2:$A$6)*($Q$2:$Q$6<0),0))}
J2{=INDEX(Q$2:Q$6,MATCH(1,($A2=$A$2:$A$6)*($Q$2:$Q$6<0),0))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
This worked great,

Thank you very much



Is this what you want?

Here I am assuming that you have more than one type of item in col A.

Unknown
ABCDEFGHIJKLMNOPQ
5/24/2017
5/24/2017
5/24/2017
5/24/2017
5/24/2017

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]
[TD="bgcolor: #FAFAFA, align: center"]Textbox18[/TD]
[TD="bgcolor: #FAFAFA, align: center"]SUPPLYQTY1[/TD]
[TD="bgcolor: #FAFAFA, align: center"]DEMANDQTY1[/TD]
[TD="bgcolor: #FAFAFA, align: center"]MRPTYPE[/TD]
[TD="bgcolor: #FAFAFA, align: center"]ORDERNUMBER1[/TD]
[TD="bgcolor: #FAFAFA, align: center"]Item[/TD]
[TD="bgcolor: #FAFAFA, align: center"]RELEASEDATE_I[/TD]
[TD="bgcolor: #FAFAFA, align: center"]DUEDATE[/TD]
[TD="bgcolor: #FAFAFA, align: center"]Move in Date[/TD]
[TD="bgcolor: #FAFAFA, align: center"]Move in Qty[/TD]
[TD="bgcolor: #FAFAFA, align: center"]SUPPLYQTY[/TD]
[TD="bgcolor: #FAFAFA, align: center"]DEMANDQTY[/TD]
[TD="bgcolor: #FAFAFA, align: center"]STSDESCR[/TD]
[TD="bgcolor: #FAFAFA, align: center"]MOVEIN[/TD]
[TD="bgcolor: #FAFAFA, align: center"]MOVEOUT[/TD]
[TD="bgcolor: #FAFAFA, align: center"]CANCELLED[/TD]
[TD="bgcolor: #FAFAFA, align: center"]PAB[/TD]

[TD="align: center"]2[/TD]
[TD="bgcolor: #FAFAFA, align: center"]01-31951-000[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,737[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,550[/TD]
[TD="bgcolor: #FAFAFA, align: center"]IV[/TD]
[TD="bgcolor: #FAFAFA, align: center"]MAIN[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]01/01/00[/TD]
[TD="bgcolor: #FAFAFA, align: center"]07/09/16[/TD]

[TD="align: right"]-63[/TD]
[TD="bgcolor: #FAFAFA, align: center"]387[/TD]
[TD="bgcolor: #FAFAFA, align: center"]0[/TD]
[TD="bgcolor: #FAFAFA, align: center"]On Hand[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]387[/TD]

[TD="align: center"]3[/TD]
[TD="bgcolor: #FAFAFA, align: center"]01-31951-000[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,737[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,550[/TD]
[TD="bgcolor: #FAFAFA, align: center"]SOP[/TD]
[TD="bgcolor: #FAFAFA, align: center"]4003777[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]01/01/00[/TD]
[TD="bgcolor: #FAFAFA, align: center"]5/19/2017[/TD]

[TD="align: right"]-63[/TD]
[TD="bgcolor: #FAFAFA, align: center"]0[/TD]
[TD="bgcolor: #FAFAFA, align: center"]150[/TD]
[TD="bgcolor: #FAFAFA, align: center"]Order[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]237[/TD]

[TD="align: center"]4[/TD]
[TD="bgcolor: #FAFAFA, align: center"]01-31951-000[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,737[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,550[/TD]
[TD="bgcolor: #FAFAFA, align: center"]SOP[/TD]
[TD="bgcolor: #FAFAFA, align: center"]4010189[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]01/01/00[/TD]
[TD="bgcolor: #FAFAFA, align: center"]5/24/2017[/TD]

[TD="align: right"]-63[/TD]
[TD="bgcolor: #FAFAFA, align: center"]0[/TD]
[TD="bgcolor: #FAFAFA, align: center"]150[/TD]
[TD="bgcolor: #FAFAFA, align: center"]Order[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]87[/TD]

[TD="align: center"]5[/TD]
[TD="bgcolor: #FAFAFA, align: center"]01-31951-000[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,737[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,550[/TD]
[TD="bgcolor: #FAFAFA, align: center"]SOP[/TD]
[TD="bgcolor: #FAFAFA, align: center"]4010245[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]01/01/00[/TD]
[TD="bgcolor: #FAFAFA, align: center"]5/24/2017[/TD]

[TD="align: right"]-63[/TD]
[TD="bgcolor: #FAFAFA, align: center"]0[/TD]
[TD="bgcolor: #FAFAFA, align: center"]150[/TD]
[TD="bgcolor: #FAFAFA, align: center"]Order[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]-63[/TD]

[TD="align: center"]6[/TD]
[TD="bgcolor: #FAFAFA, align: center"]01-31951-000[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,737[/TD]
[TD="bgcolor: #FAFAFA, align: center"]2,550[/TD]
[TD="bgcolor: #FAFAFA, align: center"]POP[/TD]
[TD="bgcolor: #FAFAFA, align: center"]PO193294[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]03/09/17[/TD]
[TD="bgcolor: #FAFAFA, align: center"]5/26/2017[/TD]

[TD="align: right"]-63[/TD]
[TD="bgcolor: #FAFAFA, align: center"]850[/TD]
[TD="bgcolor: #FAFAFA, align: center"]0[/TD]
[TD="bgcolor: #FAFAFA, align: center"]Firm[/TD]
[TD="bgcolor: #FAFAFA, align: center"]X[/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"][/TD]
[TD="bgcolor: #FAFAFA, align: center"]787[/TD]

</tbody>
Sheet20

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Array Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: #DAE7F5"]
[TH="width: 10"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10, bgcolor: #DAE7F5"]I2[/TH]
[TD="align: left"]{=INDEX(H$2:H$6,MATCH(1,($A2=$A$2:$A$6)*($Q$2:$Q$6<0),0))}[/TD]
[/TR]
[TR]
[TH="width: 10, bgcolor: #DAE7F5"]J2[/TH]
[TD="align: left"]{=INDEX(Q$2:Q$6,MATCH(1,($A2=$A$2:$A$6)*($Q$2:$Q$6<0),0))}[/TD]
[/TR]
</tbody>[/TABLE]
Enter the formula with "Ctrl+Shift+Enter". Only Pressing "Enter" will result in formula giving error or incorrect result. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,848
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top