So I have an excel dataset of participants that are possibly eligible to partake in a study that consists of their names, age, telephone number, etc... like:

Name | Age | Phone | Email | Address | Studies Participated in

I also have a column of names of participants that are eligible for a new study; it is a subset of the data in the name column.

What I need to do is select all of the participants whose names are in the subset column, and copy and paste all of their information in all of the columns into new columns.

I have tried something like, selecting an empty column and using =IF($Name-column = $Subset-column, First-Column:Last-Column, "") But this only checks if the name in each cell of the Name Column matches the name in the Subset column. What I need is something that checks if any of the names in the Name column match those in the Subset Column, and if they do, then to copy that row to a new worksheet.

You can Index all of your data and then Match rows to the subset names and pull over each column.

For example, it would look something like this:

=INDEX(All!A1:F4,MATCH(Subset!A2,All!A1:A4,0),2)

Let's break this down:

The index function takes the following arguments:

Index(Array, Row_Number, Column_Number)

The array will be all the data you have, the row number we'll use a match function (below) to find which row to get data from, and the column number represents which column from the index to pull information from (we'll keep incrementing this to get all the columns).

To return the correct row, we'll use match

Match(Lookup_Value, Lookup_Array, Match_Type)

For lookup value, we want to point it to the current row of the subset list, the lookup array will be all the names available from the index we defined previously in the master list, and the match type will equal 0 (for exact match)

Take a look at this excel document