Delete Lines that possess one of the criteria in this list

B5rocksass

Board Regular
Joined
Jan 10, 2017
Messages
56
Office Version
  1. 2016
Platform
  1. Windows
I have a report that i run for departmental metrics but the report has some lines that should not be factoring in. I would like to remove them with a macro, but i'm unsure if I'll get consistent results if I record it as 'filtering to delete for each criteria' in the list. There has to be a better way. Please note that all the criteria will only ever be found in one particular column. I mocked up my example and added a small list to delete the lines with that criteria. I'm hoping someone can help me design the macro. I don't know much about VBA unfortunately. Please advise.

Test.xlsm
ABCDEF
1PO NumberPO DateVendor NameVendor #Item NumberItem Description
22229871/22/2019NORTH AMERICA16034243005.905DIAMETER X18.504WI
322913811/8/2019VISION TECHNOLOGIES1568515000-UMLK-1Item-1
42311782/21/2020VISION TECHNOLOGIES1568515000-UMLK-5Item-5
523572610/8/2020TRUST CORPORATION162710RS-SAAS-MOORCLOUD LICENSE
623572610/8/2020TRUST CORPORATION162710RS-SAAS-WBCLOUD LICENSE
72375911/25/2021SET-RITE OF BONNEVILLE121671D0390013ZItem-1
82380662/12/2021SET-RITE OF BONNEVILLE161963D0390013ZItem-3
92390233/29/2021NORTH AMERICA,INC.96808189.429.10varnish
102390823/31/2021ELECTRONICS FOR ALL15581370970519CONNECTOR 90 DEG 4 PIN SCR
112395754/21/2021CRANE-IT161597CRANE INSPECTANNUAL INSPECTION
122395754/21/2021CRANE-IT161597TRUCK CHARGETRUCK CHARGE
132397194/27/2021ELECTRONICS FOR ALL15581371093991PANEL MOUTN RECEPTABLE KIT FEM
142397374/28/2021ELECTRONICS FOR ALL15581370007012LIGHT BLOCK ASSEMBLY 110.120VA
152398575/3/2021ACTEGA NORTH AMERICA,INC.96808110003698varnish
162398855/4/2021ELECTRONICS FOR ALL15581370008931ELECTRIC-LIGHT MODLE
172399205/5/2021ELECTRONICS FOR ALL15581370176810CONTACT REMOVAL KIT
182399225/5/2021WIPERS FOR YOU15618150LBSWHITE SHEETING
192399335/5/2021MARO INDUSTRIES, INC.163235P4349FIRE EXTINGUISHER (DO NO BLOCK)
202399335/5/2021MARO INDUSTRIES, INC.163235C2226-CECUSTOM FLOOR SIGN
212400045/7/2021AKLODA INC91614054615015X15X6 CORRUGATE
22
23Vendor# to Remove
24160342
25156851
26162710
27121671
28161963
Test
 
Hi JoeMo! Can you quick tell me how i can make this macro available to all open spreadsheets. When i created the macro, it seemed to marry itself to that sheet. When i closed it, it was no longer available. Please help!
 
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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