Display Entire Filtered Row Except Need Value from One Column on Separate Row

jarett

Board Regular
Joined
Apr 12, 2021
Messages
179
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Tried preforming this in SQL and not having any luck, so I created a new column D to insert a formula. I am pulling data from one table in SQL, it will have multiple records for one item code, I need to display the data on just the items codes with a warehouscode (I) of 002. However, I need the QuantityOnPurchaseOrder value from the records with warehousecode of 009 to display on the row with warehousecode of 002. Thinking I could display this value in the new column and then hide any lines with the warehousecode of 009, that way just 002 is being displayed.
Sample Data
WPF_REORDER_PT.xlsx
ABCDEFGHIJ
1ItemCodeQuantityOnHandQuantityOnSalesOrderQuantityOnPOQuantityOnPurchaseOrderReorderPointQtyMinimumOrderQtyLastPhysicalCountDateWarehouseCodeRecomended Order QTY
2WPF01-0648-BLACK81100251506/23/2023 0:00002150
3WPF01-0648-BLACK01010251506/23/2023 0:00009150
4WPF01-112-HGB-A208200483006/23/2023 0:00002 
5WPF01-112-NW-A64200483006/23/2023 0:00002300
6WPF01-112-NW-A050050048300#######################009 
7WPF01-1GAL583209278/17/2023 0:00002 
8WPF01-30296-WHITE24900242506/23/2023 0:00002 
9WPF01-315M-MOSSY OAK BREAKUP86450483006/23/2023 0:00002300
10WPF01-3315-NAVY46000503006/23/2023 0:00002 
11WPF01-7301-CAVIAR BLACK-S300636/22/2023 0:000023
12WPF01-7301-CAVIAR BLACK-S04663#######################009 
WPF_REORDER_PT
Cell Formulas
RangeFormula
J3:J12J3=IF([@QuantityOnPurchaseOrder]>=[@MinimumOrderQty],"",IF([@QuantityOnHand]-[@QuantityOnSalesOrder] <= [@ReorderPointQty],[@MinimumOrderQty], ""))


Desired Output and I will hide the QuantityOnPurchaseOrderColumn and have to change my formula at the end to give me correct values in J
WPF_REORDER_PT.xlsx
ABCDEFGHIJ
1ItemCodeQuantityOnHandQuantityOnSalesOrderQuantityOnPOQuantityOnPurchaseOrderReorderPointQtyMinimumOrderQtyLastPhysicalCountDateWarehouseCodeRecomended Order QTY
2WPF01-0648-BLACK8110100251506/23/2023 0:00002150
4WPF01-112-HGB-A208200483006/23/2023 0:00002 
5WPF01-112-NW-A64205000483006/23/2023 0:00002300
7WPF01-1GAL583209278/17/2023 0:00002 
8WPF01-30296-WHITE24900242506/23/2023 0:00002 
9WPF01-315M-MOSSY OAK BREAKUP86450483006/23/2023 0:00002300
10WPF01-3315-NAVY46000503006/23/2023 0:00002 
11WPF01-7301-CAVIAR BLACK-S3060636/22/2023 0:000023
WPF_REORDER_PT
Cell Formulas
RangeFormula
J4:J5,J7:J11J4=IF([@QuantityOnPurchaseOrder]>=[@MinimumOrderQty],"",IF([@QuantityOnHand]-[@QuantityOnSalesOrder] <= [@ReorderPointQty],[@MinimumOrderQty], ""))
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
Got a solution, I cleared the filters and have all columns unhidden to show all the data. When I add the filters it will only be displaying row 5 for the WPF01-112-NW-A item code.
WPF_REORDER_PT.xlsx
ABCDEFGHIJK
1ItemCodeQuantityOnHandQuantityOnSalesOrderQuantityOnPOHoldPOFieldQuantityOnPurchaseOrderReorderPointQtyMinimumOrderQtyLastPhysicalCountDateWarehouseCodeRecomended Order QTY
2WPF01-0648-BLACK8110000251506/23/2023 0:00002 
3WPF01-10900280000316/23/2023 0:00002 
4WPF01-112-HGB-A2082000048246/23/2023 0:00002 
5WPF01-112-NW-A64205000048246/23/2023 0:00002 
6WPF01-112-NW-A0500050050048300#######################009 
WPF_REORDER_PT
Cell Formulas
RangeFormula
D2:D6D2=IF(E3>0,E3,0)
E2:E6E2=IF([@WarehouseCode]="009",[@QuantityOnPurchaseOrder],"0")
K2:K6K2=IF([@QuantityOnPO]>=[@MinimumOrderQty],"",IF([@QuantityOnHand]-[@QuantityOnSalesOrder] <= [@ReorderPointQty],[@MinimumOrderQty], ""))
 
Upvote 0

Forum statistics

Threads
1,223,228
Messages
6,170,875
Members
452,363
Latest member
merico17

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