Delete row if Column H contains any of the following values - VBA

CC268

Active Member
Joined
Mar 7, 2016
Messages
328
I simply want to delete a row if Column H contains any of the following values:
-%
-Resistor
-Capacitor
-MCKT
-Connector
-anything else I may want to add to this list...


Thanks!
 
Did you try the update I made to Rick's code for you?
 
Upvote 0

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Actually
Which rows does it skip? ReadRow is the row being checked, so needs to start at 4. n is used to calculate how many rows to check. So if it's too high, some of the rows at the end won't get checked.
Actually I did it last night on my own now I am not in front of screen I'll check & reply you back in few hours!
 
Upvote 0
Thx it did
Zshanar69 - in my code that you quoted, you just need to change the 1 in the ReadRow... and For... lines to the row number of the first cell. So for H4:
Code:
ReadRow = 1
For n = 1 to LastRowNum
becomes:
Code:
ReadRow = 4
For n = 4 to LastRowNum
Thx it worked!
Actually I just changed n = 4 to LastRowNum
But didn't change ReadRow = 4
Now this works just fine!
 
Upvote 0

Forum statistics

Threads
1,216,796
Messages
6,132,742
Members
449,756
Latest member
AdkinsP

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