Filter spreadsheet based on a list

rogueakula

New Member
Joined
Apr 23, 2018
Messages
19
So I have a spreadsheet that has over a A HUNDRED AND FIFTY THOUSAND entries that makes it almost unusable. I didn't make it, but I am required to filter out everything except what belongs to me. I am looking for a way that I can filter based on a list. I have 59 names that is need from this spreadsheet and, if there is a way, copy the rows to another sheet. I would rather not have to search for each name individually and move to another sheet. I have been trying with advanced filter but I haven' found a way yet. Any ideas? I hope this makes sense. Thank you so much for your help!

-Josh
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
You said:
I have 59 names that is need from this spreadsheet and, if there is a way, copy the rows to another sheet.

Where are these 59 names?

And what column would we find these names in?
And copy these rows to what sheet?

Give us details like column B or column Z and both sheet names.
Copy from sheet name and copy to sheet name.
 
Upvote 0
a slimdown version of your spreadsheet, Column B shows only matched names in Column D that can be extended.

filtered out the blanks in column B will get you the list


Excel 2013/2016
ABCD
1A B
2AD
3BB
4BB
5C
6C
7DD
8C
9C
10BB
Sheet2
Cell Formulas
RangeFormula
B1=IFERROR(LOOKUP(2,1/ISNUMBER(SEARCH($D$1:$D$2,A1)),$D$1:$D$2),"")
 
Upvote 0
And, I can post the list of names anywhere. That is just a cut a paste. I have no idea how to start setting this up.
 
Upvote 0
If the names don't change you can do it like this
Code:
Sub FilterCopy()
   Dim Ary As Variant
   
   Ary = Array("[COLOR=#ff0000]Wiltshire[/COLOR]", "[COLOR=#ff0000]Somerset[/COLOR]", "[COLOR=#ff0000]Devon[/COLOR]", "[COLOR=#ff0000]Dorset[/COLOR]")
   With Sheets("Sheet1")
      If .AutoFilterMode Then .AutoFilterMode = False
      .Range("A1", .UsedRange).AutoFilter 5, Ary, xlFilterValues
      .UsedRange.Offset(1).SpecialCells(xlVisible).Copy Sheets("sheet2").Range("A" & Rows.Count).End(xlUp).Offset(1)
      .AutoFilterMode = False
   End With
End Sub
Change the values in red to suit & add more in the same manner.
 
Upvote 0
Are you saying you want a script to look through each row on sheet(1) and if some name in column E matches a certain name then copy that row to sheet(2)

So how do we know what names to look for

Assuming this list of certain names are on some other sheet where on this other sheet will we find the names to filter out.
 
Upvote 0
Fluff! That is awesome! Thank you I am going to try this out right now!

-Josh

If you have 50 names your going to put into that array that's going to be a job.

You should enter all these 50 names on another sheet and tell us where this range of names are.
 
Upvote 0
My Answer Is This,

I don't necessarily need a script, I just want something to weed through all the crap that I don't want to look at. So in my mind, I have a list of my 59 names in another sheet or anywhere really. A script or a filter looks at these 59 names and then copies any row in sheet 1 that has one of those names in column E to sheet2.

-Josh
 
Upvote 0

Forum statistics

Threads
1,223,954
Messages
6,175,600
Members
452,658
Latest member
GStorm

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