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!
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,214,593
Messages
6,120,435
Members
448,961
Latest member
nzskater

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