Solved

Excel 2010 Filtering Rows Based on Match List

Posted on 2014-04-09
3
37,177 Views
Last Modified: 2014-04-23
I have an Excel Workbook that contains 2 sheets.

Sheet1 contains 93 columns and 50,000 rows.

Sheet2 contains a single column (Names), with 2000 rows.

I want to filter the rows in Sheet1, by the Name column, based on the Names that are located in Sheet 2.

I would like to have Sheet1 filtered, so it contains all 93 columns of data, based on the 2000 names I have in Sheet2.

I've tried the Advanced filter in place, however this was unsuccessful.

My excel skill level is intermediate.  I appreciate any help.

As some background information: Sheet 1 is an Outlook contacts list. Sheet 2 is a list of names that are located on Sheet1. I wish to have the sheet filtered to get all the values on Sheet 1, so I have 2000 rows of names and 93 columns.

Thanks.
0
Comment
Question by:fireguy1125
3 Comments
 
LVL 48

Expert Comment

by:Rgonzo1971
Comment Utility
HI,

Could you send a dummy example?

Regards
0
 
LVL 26

Accepted Solution

by:
MacroShadow earned 250 total points
Comment Utility
1. Select the range of names on sheet 2 and name it "NamedList" (without the quotes) by entering the name in the Name box on the left side of the Formula Bar.
2. On sheet 1, in the first column to right of your data (CP), enter in row 2 (leaving row 1 blank):
 =COUNTIF(NamedList, A2)

Open in new window

3.  Select cell A2 (on sheet 1), and choose Data/Advanced Filter. In the dialog, select the "Filter the list, in place" radio button.
4. Verify the List Range contains the range of your data.
5. In the Criteria Range box, enter CP1:CP2 (make sure you include row 1)
6. Click OK

Note: This example assumes that your data has a header row.
0
 
LVL 31

Assisted Solution

by:Rob Henson
Rob Henson earned 250 total points
Comment Utility
You could implement an INDEX formula alongside your 2000 names in sheet2.

Insert a row above your 2000 names and copy and paste the headers from the source sheet and move your 2000 names to the correct column, for this purpose I will assume that the name is column A.

For the other columns use the following formula:

=INDEX(Sheet1!$A$1:$CO$50000,MATCH($A2,Sheet1!$A$1:$A$50000,0),MATCH(B$1,Sheet1!$A$1:$CO$1,0))

This says, look at the range Sheet2!A1:CO50000 (CO = column 93) and in column A of that range find the match for the value in column A of sheet 2 to determine the row to use for the result. Then look at the header in row 1 and find the column for the header in sheet1. Thuis creating an intersect of row and column based on the name in column A.

The sections refrring to column A that are bold and underlined, should be adjusted to reflect your data and adjust the 50000 to reflect the actual number of rows.

Thanks
Rob H
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now