Exclude data based on cell value

Noxqss38242

Board Regular
Joined
Sep 15, 2017
Messages
225
Office Version
  1. 2016
Work Between PMs.xlsx
ABCDEFGHIJKLMNOPQRSTUVW
1Equip. TypeEquip. IdTerminal CodeReason CodeReason TextSystem CodeSystem TextAssembly CodeAssembly TextComponent CodeComponent TextWork Acc. CodeWork Acc. TextPosition CodePosition TextFailure CodeFailure TextTask HoursTask LaborTask PartsTask TotalWarranty FiledOrig. Key
2P16906WMPMPM00PWRUNT00TRAC001UNITAPM-ANN99NA01DUE3.3181.5217.78399.283516788
3P16906WMMAMAINT13BRKTRA09ACOMPR001ASMBLY09DIANOS99NA00NOFAIL0.949.5049.53516788
4P16906WMMAMAINT13BRKTRA07LINES001RUBBER03RPLNEW13LFRONT49CUT0.527.512.2339.733516788
5P16907ROMAMAINT01HVAC01ACHOOD002COMPRS09DIANOS99NA12BROKEN00003514197
6P16907RORHRD HAZ96TIRES01STEER102RIGHT03RPLNEW000434.363522825
7P16907RORHRD HAZ96TIRES01STEER999OTHER71SCRAP01QTY 118LEAK0009.953522825
8P16908LRMAMAINT45ENGINE12COOLER001ENGOIL03RPLNEW99NA18LEAK000519.063516886
9P16909ROPMPM00PWRUNT00TRAC001UNITAPM-ANN99NA01DUE000495.613510347
10P16909ROMAMAINT32CRNKSY01BA/CAB001BATT03RPLNEW02QTY 243WEAK000495.623510347
11P16909ROMAMAINT01HVAC01ACHOOD002COMPRS03RPLNEW99NA12BROKEN000315.293523108
12P16909ROMAMAINT42COOLSY03FANASY010BELT03RPLNEW99NA12BROKEN00020.773523108
13P16909ROMAMAINT01HVAC01ACHOOD048BELT03RPLNEW99NA12BROKEN00036.693523108
14P16909ROMAMAINT13BRKTRA09ACOMPR038UNLOAD03RPLNEW99NA12BROKEN00025.263523108
15P16909ROMAMAINT42COOLSY03FANASY002IDLER03RPLNEW99NA12BROKEN00003523108
16P16909ROMAMAINT01HVAC01ACHOOD285LINE03RPLNEW99NA12BROKEN00021.253523108
17P16912ROACACCID02CAB10MIRROR018R DOOR03RPLNEW23RIGHT12BROKEN000199.53520406
18P16912MUPMPM00PWRUNT00TRAC001UNITAPM-ANN99NA01DUE3165206.6371.63515772
19P16912MUACACCID14FRAME02BUMPER001ASMBLY03RPLNEW99NA98ACCID0.949.5723.59773.093515772
20P16912MUACACCID02CAB10MIRROR026HOOD03RPLNEW22LEFT98ACCID0.738.5135.36173.863515772
21P16912MUMAMAINT18WHLEND01STERAX026HUBCAP24REPAIR23RIGHT08OVRFUL0.738.5038.53515772
22P16912MUMAMAINT02CAB35WSWIPE015BLADE03RPLNEW02QTY 244WORN0.316.5824.53515772
23P16912MUACACCID04AERODY04CABEXT004RUBBER03RPLNEW19LORITE46MISSNG0.422146.98168.983515772
24P16912MUMAMAINT15STEERG05PWRSTE002RESERV24REPAIR99NA18LEAK0.8440443515772
25P16912MUACACCID04AERODY04CABEXT001LEFT03RPLNEW22LEFT12BROKEN0.633195.29228.293515772
26P16912MUPMPM00PWRUNT00TRAC001UNITBB INSP99NA27F-INSP00003515772
27P16912MUMAMAINT14FRAME02BUMPER013BGBRKT03RPLNEW99NA19LOOSE0.844485.75529.753515772
28P16912MUMAMAINT02CAB11INSIDE001BUNK24REPAIR99NA19LOOSE0.527.5027.53515772
29P16912MUMAMAINT96TIRES03DRIVE004QTY 404RETRED0.8447658093515772
30P16912MUMAMAINT96TIRES03DRIVE999OTHER09DIANOS04QTY 444WORN0.4220223515772
31P16912MUMAMAINT96TIRES01STEER102RIGHT03RPLNEW0.422416.73438.733515772
32P16912MUMAMAINT13BRKTRA02DRVAXL050PAD03RPLNEW13LFRONT44WORN1.26673.28139.283515772
33P16912MUMAMAINT13BRKTRA02DRVAXL050PAD03RPLNEW10R REAR44WORN0.84473.28117.283515772
34P16912MUMAMAINT32CRNKSY01BA/CAB001BATT24REPAIR04QTY 424EL CRS0.949.5049.53515772
35P16912MUMAMAINT96TIRES03DRIVE100ROTATE09DIANOS99NA21OUTADJ0.4220223515772
36P16913MUPMPM45ENGINE01ASSMBY001COMPLTVOVERHD99NA01DUE0004913467352
Sheet2


So for this data, "Work Acc. Code" is in column L and the identifier for the work order is "Orig. Key" in column W
If L2 is "A" or "C", then whatever the identifier code is (which is 3516788 in this case, ignore any work done with that value.
Given that rows, 1 - 3 should be ignored or given a value I can track like "0" or "1"...doesn't matter, looking for a way to exclude them...
Rows 4 - 8 should then obviously be included so it can be given a different value in the formula because it doesn't match what is to be ignored...
Still, an "A" code shows up in row 9, so its identifier of "3510347" should also be ignored...meaning row 10 should be excluded and row 11 be included since the identifier doesn't match though the same unit number.

Essentially...hopefully...come up with a code that says if L2 = "A" or "C", then the Value of W anywhere else in the column = "0" BUT need the code to get all "A" or "C" identifiers
So if "A" or "C" shows up, grab the identifier in column "W" that corresponds and exclude all matches of the identifier.

Lord, I hope I explained that well enough... :P

Any solution?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Book3
ABCDEFGHIJKLMNOPQRSTUVWX
1Equip. TypeEquip. IdTerminal CodeReason CodeReason TextSystem CodeSystem TextAssembly CodeAssembly TextComponent CodeComponent TextWork Acc. CodeWork Acc. TextPosition CodePosition TextFailure CodeFailure TextTask HoursTask LaborTask PartsTask TotalWarranty FiledOrig. KeyID2
2P16906WMPMPM0PWRUNT0TRAC1UNITAPM-ANN99NA1DUE3.3181.5217.78399.2835167883516788
3P16906WMMAMAINT13BRKTRA9ACOMPR1ASMBLY9DIANOS99NA0NOFAIL0.949.5049.535167883516788
4P16906WMMAMAINT13BRKTRA7LINES1RUBBER3RPLNEW13LFRONT49CUT0.527.512.2339.7335167883516788
5P16907ROMAMAINT1HVAC1ACHOOD2COMPRS9DIANOS99NA12BROKEN000035141970
6P16907RORHRD HAZ96TIRES1STEER102RIGHT3RPLNEW000434.3635228250
7P16907RORHRD HAZ96TIRES1STEER999OTHER71SCRAP1QTY 118LEAK0009.9535228250
8P16908LRMAMAINT45ENGINE12COOLER1ENGOIL3RPLNEW99NA18LEAK000519.0635168860
9P16909ROPMPM0PWRUNT0TRAC1UNITAPM-ANN99NA1DUE000495.6135103473510347
10P16909ROMAMAINT32CRNKSY1BA/CAB1BATT3RPLNEW2QTY 243WEAK000495.6235103473510347
11P16909ROMAMAINT1HVAC1ACHOOD2COMPRS3RPLNEW99NA12BROKEN000315.2935231080
12P16909ROMAMAINT42COOLSY3FANASY10BELT3RPLNEW99NA12BROKEN00020.7735231080
13P16909ROMAMAINT1HVAC1ACHOOD48BELT3RPLNEW99NA12BROKEN00036.6935231080
14P16909ROMAMAINT13BRKTRA9ACOMPR38UNLOAD3RPLNEW99NA12BROKEN00025.2635231080
15P16909ROMAMAINT42COOLSY3FANASY2IDLER3RPLNEW99NA12BROKEN000035231080
16P16909ROMAMAINT1HVAC1ACHOOD285LINE3RPLNEW99NA12BROKEN00021.2535231080
17P16912ROACACCID2CAB10MIRROR18R DOOR3RPLNEW23RIGHT12BROKEN000199.535204060
18P16912MUPMPM0PWRUNT0TRAC1UNITAPM-ANN99NA1DUE3165206.6371.635157723515772
19P16912MUACACCID14FRAME2BUMPER1ASMBLY3RPLNEW99NA98ACCID0.949.5723.59773.0935157723515772
20P16912MUACACCID2CAB10MIRROR26HOOD3RPLNEW22LEFT98ACCID0.738.5135.36173.8635157723515772
21P16912MUMAMAINT18WHLEND1STERAX26HUBCAP24REPAIR23RIGHT8OVRFUL0.738.5038.535157723515772
22P16912MUMAMAINT2CAB35WSWIPE15BLADE3RPLNEW2QTY 244WORN0.316.5824.535157723515772
23P16912MUACACCID4AERODY4CABEXT4RUBBER3RPLNEW19LORITE46MISSNG0.422146.98168.9835157723515772
24P16912MUMAMAINT15STEERG5PWRSTE2RESERV24REPAIR99NA18LEAK0.84404435157723515772
25P16912MUACACCID4AERODY4CABEXT1LEFT3RPLNEW22LEFT12BROKEN0.633195.29228.2935157723515772
26P16912MUPMPM0PWRUNT0TRAC1UNITBB INSP99NA27F-INSP000035157723515772
27P16912MUMAMAINT14FRAME2BUMPER13BGBRKT3RPLNEW99NA19LOOSE0.844485.75529.7535157723515772
28P16912MUMAMAINT2CAB11INSIDE1BUNK24REPAIR99NA19LOOSE0.527.5027.535157723515772
29P16912MUMAMAINT96TIRES3DRIVE4QTY 44RETRED0.84476580935157723515772
30P16912MUMAMAINT96TIRES3DRIVE999OTHER9DIANOS4QTY 444WORN0.42202235157723515772
31P16912MUMAMAINT96TIRES1STEER102RIGHT3RPLNEW0.422416.73438.7335157723515772
32P16912MUMAMAINT13BRKTRA2DRVAXL50PAD3RPLNEW13LFRONT44WORN1.26673.28139.2835157723515772
33P16912MUMAMAINT13BRKTRA2DRVAXL50PAD3RPLNEW10R REAR44WORN0.84473.28117.2835157723515772
34P16912MUMAMAINT32CRNKSY1BA/CAB1BATT24REPAIR4QTY 424EL CRS0.949.5049.535157723515772
35P16912MUMAMAINT96TIRES3DRIVE100ROTATE9DIANOS99NA21OUTADJ0.42202235157723515772
36P16913MUPMPM45ENGINE1ASSMBY1COMPLTVOVERHD99NA1DUE00049134673520
Sheet1
Cell Formulas
RangeFormula
X2X2=IF(OR(L2="A",L2="C"),W2,0)
X3:X36X3=IF(OR(L3="A",L3="C",W3=X2),W3,0)
 
Upvote 0
I believe I can make that formula work for what I need. Will just have to make sure to sort by W, then by L.

Thank you!
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,191
Members
452,616
Latest member
intern444

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