Filter a list based on a list of terms, then copy filtered list into a new sheet

olliecord

New Member
Joined
Jan 13, 2022
Messages
3
Office Version
  1. 2021
Platform
  1. MacOS
I receive a long list of data of people I want to contact, but want to filter out the people I don't want to contact.


Each row (person) will have multiple columns, one of which could be "Location" [London, Paris, New York...]
I have a list of blacklisted terms, for example [Paris, Cairo, Osaka]

Another column example would be "Job Title", [CEO of Apple, Managing Director, Sales Executive at Microsoft...]
I have a list of blacklisted terms for example only the word "Executive" or "Microsoft".

I want to filter my list of people based on the "blacklisted" terms and then copy the filtered list (good list) into another area (copying all rows).
This will remove all of the people that have a blacklisted term in their entire row.

Please can anyone provide some help with this?
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
on a Mac ???
VBA Code:
Sub test()
     Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy     'copy the visible cells in this range
     Range("A50").PasteSpecial xlValues                         'paste them here as values
End Sub
 
Upvote 0
on a Mac ???
VBA Code:
Sub test()
     Range("A1").CurrentRegion.SpecialCells(xlCellTypeVisible).Copy     'copy the visible cells in this range
     Range("A50").PasteSpecial xlValues                         'paste them here as values
End Sub
Thank you, now how do I apply filters in this ^ above?
 
Upvote 0
VBA Code:
Sub test()
Sheets("MySheet").ListObjects("TBL_Names").Range.SpecialCells(xlCellTypeVisible).Copy     'copy the visible cells of this list (=a listobject)
     Sheets("My Other Sheet").Range("A50").PasteSpecial xlValues     'paste thel here as valuse
End Sub
 
Upvote 0
Solution
VBA Code:
Sub test()
Sheets("MySheet").ListObjects("TBL_Names").Range.SpecialCells(xlCellTypeVisible).Copy     'copy the visible cells of this list (=a listobject)
     Sheets("My Other Sheet").Range("A50").PasteSpecial xlValues     'paste thel here as valuse
End Sub
Thank you so much, I will give this a try now!
 
Upvote 0

Forum statistics

Threads
1,216,558
Messages
6,131,400
Members
449,649
Latest member
kyouryo

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