Index+Match/Index+Small

Mrbellav

New Member
Joined
Aug 29, 2018
Messages
2
So I have a workbook with two sheets

Sheet 1 (Demand)

Has a table of all of the items on the sales for a specific date and the quantities.
Column A= Item #
Column B=Sales order #
Column C=Date of sales order
Column D=Qty of Item on order

ItemsSales #DateQty
Item 1SO#19/1/185
Item 2SO#19/1/182
Item 3SO#19/1/187
Item 2SO#29/1/182
Item 3SO#29/1/183
Item 1SO#39/1/181
Item 4SO#49/1/1810
Item 5SO#49/1/186
Item 1SO#49/1/185

<tbody>
</tbody>


Sheet two (Inventory)

This sheet has a list of items, the total demand of the item across all sales orders. And the total on hand inventory of each Item, then the difference in amount. (I have this set up to only show my negative amounts, I have a sheet with all and a sheet of just negatives)
-Function I'm looking for will only go on the sheet with negatives.

Column A= Item #
Column B=Total Demand
Column C=Inventory
Column D=Difference

ItemsTotal DemandInventory (On Hand)Product Needed
Item 11110-1
Item 2451
Item 3105-5
Item 410100
Item 563-3

<tbody>
</tbody>

I already have a macro to move these Negative rows to a different sheet working correctly.


Sheet 3 Product Needed
Column a=Item#
Column B=Total Demand
Column C=Inventory
Column D=Product Needed

ItemsTotal DemandInventoryProduct Short
Item 11110-1
Item 3105-5
Item 563-3

<tbody>
</tbody>


So what I'm looking for is a function to tell me all of the sales order number that will potentially be short.
Ex... Item 1, SO#1, SO#3, SO#4

What I have tried so far is a array:
Index(Sheet1'!B2:B10,match(0,if($g$1=Sheet'!A2:A10,countif($G$1:G1,Sheet1'!a2:a10).""),0))

Also tried an..
Index( x, small(if( row()-min(row(), rows())


Could not get this to work. I know I can use a pivot table, but would like to find it another way let me know if anyone has any ideas!
 

Some videos you may like

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

Watch MrExcel Video

Forum statistics

Threads
1,108,654
Messages
5,524,114
Members
409,561
Latest member
ay123

This Week's Hot Topics

Top