Please help me simplify this one.

ryan0521

Board Regular
Joined
Dec 7, 2016
Messages
79
I have 3 sheets that contain data as shown below:

Posted sheet:
[TABLE="width: 660"]
<colgroup><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Item Code[/TD]
[TD]Name[/TD]
[TD]Date[/TD]
[TD]Trans. Type[/TD]
[TD]Trans. #[/TD]
[TD]UOM[/TD]
[TD]Pack[/TD]
[TD]Quantity[/TD]
[TD]Total[/TD]
[/TR]
[TR]
[TD]101[/TD]
[TD]Patty -Whopper [/TD]
[TD]3/30/2018[/TD]
[TD]Out[/TD]
[TD]18873[/TD]
[TD]CAS[/TD]
[TD]144[/TD]
[TD]2[/TD]
[TD]288[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Patty -Chicken Roya [/TD]
[TD]3/2/2018[/TD]
[TD]Out[/TD]
[TD]18646[/TD]
[TD]PCS[/TD]
[TD]1[/TD]
[TD]36[/TD]
[TD]36[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Patty -Chicken Roya [/TD]
[TD]3/6/2018[/TD]
[TD]In[/TD]
[TD]18690[/TD]
[TD]PCS[/TD]
[TD]1[/TD]
[TD]36[/TD]
[TD]36[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Patty -Chicken Roya [/TD]
[TD]3/9/2018[/TD]
[TD]In[/TD]
[TD]18721[/TD]
[TD]PCS[/TD]
[TD]1[/TD]
[TD]48[/TD]
[TD]48[/TD]
[/TR]
</tbody>[/TABLE]


Out Sheet:
[TABLE="width: 1041"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Aloha Code[/TD]
[TD]Item Name[/TD]
[TD]Req. Qty[/TD]
[TD]Approved Qty[/TD]
[TD]UOM[/TD]
[TD]Requested By[/TD]
[TD]Requested On[/TD]
[TD]Approved On[/TD]
[TD]Approved By[/TD]
[TD]Released ON[/TD]
[TD]Received On[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Chk Royale - 144 Pcs[/TD]
[TD]432[/TD]
[TD]3[/TD]
[TD]36[/TD]
[TD]BK - Care Four[/TD]
[TD]3/2/2018[/TD]
[TD]3/2/2018[/TD]
[TD]BK-Dareen[/TD]
[TD]3/2/2018[/TD]
[TD]3/2/2018[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Chk Royale - 144 Pcs[/TD]
[TD]3456[/TD]
[TD]24[/TD]
[TD]288[/TD]
[TD]BK - Care Four[/TD]
[TD]3/21/2018[/TD]
[TD]3/21/2018[/TD]
[TD]BK-Dareen[/TD]
[TD]3/21/2018[/TD]
[TD]3/21/2018[/TD]
[/TR]
</tbody>[/TABLE]


In Sheet:
[TABLE="width: 1096"]
<colgroup><col><col><col><col><col><col><col><col><col><col><col></colgroup><tbody>[TR]
[TD]Aloha Code[/TD]
[TD]Item Name[/TD]
[TD]Req. Qty[/TD]
[TD]Approved Qty[/TD]
[TD]UOM[/TD]
[TD]Requested By[/TD]
[TD]Requested On[/TD]
[TD]Approved On[/TD]
[TD]Approved By[/TD]
[TD]Released ON[/TD]
[TD]Received On[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Chk Royale - 144 Pcs[/TD]
[TD]432[/TD]
[TD]3[/TD]
[TD]36[/TD]
[TD]BK-Dareen[/TD]
[TD]3/6/2018[/TD]
[TD]3/6/2018[/TD]
[TD]BK - Care Four[/TD]
[TD]3/6/2018[/TD]
[TD]3/6/2018[/TD]
[/TR]
[TR]
[TD]103[/TD]
[TD]Chk Royale - 144 Pcs[/TD]
[TD]576[/TD]
[TD]4[/TD]
[TD]48[/TD]
[TD]BK-Dareen[/TD]
[TD]3/6/2018[/TD]
[TD]3/6/2018[/TD]
[TD]BK - Petromin Exit14[/TD]
[TD]3/6/2018[/TD]
[TD]3/8/2018[/TD]
[/TR]
</tbody>[/TABLE]


And then in the 4th sheet I made a formula in A3, on which it will check if the items listed in Posted sheet is also posted on Out sheet or In sheet, see my formula below, all I want is to simplify my formula because it's too long LOL.

=IF(Posted!A2<>"",IF(Posted!D2="In",IF(ISNUMBER(1/COUNTIFS(In!A:A,Posted!A2,In!K:K,Posted!C2,In!D:D,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(In!A:A,Posted!A2,In!K:K,VALUE(Posted!C2)-1,In!D:D,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(In!A:A,Posted!A2,In!K:K,Posted!C2,In!C:C,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(In!A:A,Posted!A2,In!K:K,VALUE(Posted!C2)-1,In!C:C,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(In!A:A,Posted!A2,In!K:K,Posted!C2,In!E:E,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(In!A:A,Posted!A2,In!K:K,VALUE(Posted!C2)-1,In!E:E,Posted!I2)),"",Posted!A2)))))),IF(ISNUMBER(1/COUNTIFS(Out!A:A,Posted!A2,Out!J:J,Posted!C2,Out!D:D,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(Out!A:A,Posted!A2,Out!J:J,VALUE(Posted!C2)-1,Out!D:D,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(Out!A:A,Posted!A2,Out!J:J,Posted!C2,Out!C:C,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(Out!A:A,Posted!A2,Out!J:J,VALUE(Posted!C2)-1,Out!C:C,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(Out!A:A,Posted!A2,Out!J:J,Posted!C2,Out!E:E,Posted!I2)),"",IF(ISNUMBER(1/COUNTIFS(Out!A:A,Posted!A2,Out!J:J,VALUE(Posted!C2)-1,Out!E:E,Posted!I2)),"",Posted!A2))))))),"")


Please help me. Thank you so much.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

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