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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Items[/TD]
[TD]Sales #[/TD]
[TD]Date[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD] Item 1[/TD]
[TD]SO#1[/TD]
[TD]9/1/18[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD] Item 2[/TD]
[TD]SO#1[/TD]
[TD]9/1/18[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] Item 3[/TD]
[TD]SO#1[/TD]
[TD]9/1/18[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD] Item 2[/TD]
[TD]SO#2[/TD]
[TD]9/1/18[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] Item 3[/TD]
[TD]SO#2[/TD]
[TD]9/1/18[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD] Item 1[/TD]
[TD]SO#3[/TD]
[TD]9/1/18[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD] Item 4[/TD]
[TD]SO#4[/TD]
[TD]9/1/18[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD] Item 5[/TD]
[TD]SO#4[/TD]
[TD]9/1/18[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD] Item 1[/TD]
[TD]SO#4[/TD]
[TD]9/1/18[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Items[/TD]
[TD]Total Demand[/TD]
[TD]Inventory (On Hand)[/TD]
[TD]Product Needed[/TD]
[/TR]
[TR]
[TD]Item 1[/TD]
[TD]11[/TD]
[TD]10[/TD]
[TD]-1[/TD]
[/TR]
[TR]
[TD]Item 2[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Item 3[/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]Item 4[/TD]
[TD]10[/TD]
[TD]10[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Item 5[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]-3[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Items[/TD]
[TD]Total Demand[/TD]
[TD]Inventory[/TD]
[TD]Product Short[/TD]
[/TR]
[TR]
[TD]Item 1[/TD]
[TD]11[/TD]
[TD]10[/TD]
[TD]-1[/TD]
[/TR]
[TR]
[TD]Item 3[/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]Item 5[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]-3[/TD]
[/TR]
</tbody>[/TABLE]
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!
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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Items[/TD]
[TD]Sales #[/TD]
[TD]Date[/TD]
[TD]Qty[/TD]
[/TR]
[TR]
[TD] Item 1[/TD]
[TD]SO#1[/TD]
[TD]9/1/18[/TD]
[TD]5[/TD]
[/TR]
[TR]
[TD] Item 2[/TD]
[TD]SO#1[/TD]
[TD]9/1/18[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] Item 3[/TD]
[TD]SO#1[/TD]
[TD]9/1/18[/TD]
[TD]7[/TD]
[/TR]
[TR]
[TD] Item 2[/TD]
[TD]SO#2[/TD]
[TD]9/1/18[/TD]
[TD]2[/TD]
[/TR]
[TR]
[TD] Item 3[/TD]
[TD]SO#2[/TD]
[TD]9/1/18[/TD]
[TD]3[/TD]
[/TR]
[TR]
[TD] Item 1[/TD]
[TD]SO#3[/TD]
[TD]9/1/18[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD] Item 4[/TD]
[TD]SO#4[/TD]
[TD]9/1/18[/TD]
[TD]10[/TD]
[/TR]
[TR]
[TD] Item 5[/TD]
[TD]SO#4[/TD]
[TD]9/1/18[/TD]
[TD]6[/TD]
[/TR]
[TR]
[TD] Item 1[/TD]
[TD]SO#4[/TD]
[TD]9/1/18[/TD]
[TD]5[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Items[/TD]
[TD]Total Demand[/TD]
[TD]Inventory (On Hand)[/TD]
[TD]Product Needed[/TD]
[/TR]
[TR]
[TD]Item 1[/TD]
[TD]11[/TD]
[TD]10[/TD]
[TD]-1[/TD]
[/TR]
[TR]
[TD]Item 2[/TD]
[TD]4[/TD]
[TD]5[/TD]
[TD]1[/TD]
[/TR]
[TR]
[TD]Item 3[/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]Item 4[/TD]
[TD]10[/TD]
[TD]10[/TD]
[TD]0[/TD]
[/TR]
[TR]
[TD]Item 5[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]-3[/TD]
[/TR]
</tbody>[/TABLE]
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
[TABLE="width: 500"]
<tbody>[TR]
[TD]Items[/TD]
[TD]Total Demand[/TD]
[TD]Inventory[/TD]
[TD]Product Short[/TD]
[/TR]
[TR]
[TD]Item 1[/TD]
[TD]11[/TD]
[TD]10[/TD]
[TD]-1[/TD]
[/TR]
[TR]
[TD]Item 3[/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD]-5[/TD]
[/TR]
[TR]
[TD]Item 5[/TD]
[TD]6[/TD]
[TD]3[/TD]
[TD]-3[/TD]
[/TR]
</tbody>[/TABLE]
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!