Delete rows based on list of different words/arguments

BexcelB

New Member
Joined
Jan 17, 2023
Messages
9
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a list of 25.000 products and some rows has to be deleted since they are not interestning.

Is is possible to create VBA code that goes trough the complete sheet and delete rows based on a list of different words/different arguments.
Product name often consist two words but the VBA code just have look on only one word.

Hope it makes sense.

Best regards
BexcelB
 
Can add another line V = Array("Louis", "Becky") etc. below to exisiting one?
You mean you want to add more keywords that should be deleted?
just do this

VBA Code:
V = Array("Louis", "Becky", "Charles","Timothy", "Hailey")
 
Upvote 0

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
You mean you want to add more keywords that should be deleted?
just do this

VBA Code:
V = Array("Louis", "Becky", "Charles","Timothy", "Hailey")
That I know and that works perfect, but when I've used all possible fields in that string and want to continue on next line something goes wrong.
 
Upvote 0
I don't understand what you mean by this, unfortunately. Possible field in which string?
Still newbie in this so maybe I'm not using the right "words". :) Each line contains is it 1023 characters? My challenge is that I've used all characters/put in the maximum of keywords in the "V = Array" line. How can add extra lines? Hope it makes sense.
 
Upvote 0
Put a space and then add an underscore and press enter. that's how you take the same line to the next line.

1674736434561.png
 
Upvote 0

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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