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.
Textbox18SUPPLYQTY1DEMANDQTY1MRPTYPEORDERNUMBER1ItemRELEASEDATE_IDUEDATEMove in DateMove in QtySUPPLYQTYDEMANDQTYSTSDESCRMOVEINMOVEOUTCANCELLEDPAB
01-31951-0002,7372,550IVMAIN1/1/19007/9/20163870On Hand387
01-31951-0002,7372,550SOP40037771/1/19005/19/20170150Order 237
01-31951-0002,7372,550SOP40101891/1/19005/24/20170150Order 87
01-31951-0002,7372,550SOP40102451/1/19005/24/20170150Order -63
01-31951-0002,7372,550POPPO1932943/9/20175/26/2017
8500Firm X787
<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> </tbody>
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
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
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

<colgroup><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet20

Array Formulas
CellFormula
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))}

<thead>
</thead><tbody>
</tbody>
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

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,578
Messages
6,131,516
Members
449,654
Latest member
andz

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