# Filtering a list of data to a separate sheet

#### ATSJ

##### Board Regular
I have a list on sheet 1 of two columns of data, A and B. Column A is a list with either a W or L. I would like to search through column A for all fields with a W and copy the entire row for each entry to sheet 2. Is it possible to do this using a variation of VLOOKUP and if so, how?

### Excel Facts

If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.

#### Momentman

##### Well-known Member
You might need to use ADVANCED FILTER and copy the filtered cell to your specified location

#### ATSJ

##### Board Regular
You might need to use ADVANCED FILTER and copy the filtered cell to your specified location

I've tried it but it doesn't automatically update when changes are made to the data in the original list from what I can tell. I want something that updates, maybe that means I need something in VBA triggered by a Worksheet_change?

#### myall_blues

##### New Member
Hi

Consider the following:
 A B C D E 1 Code Value Criteria 2 W 1 W 1 3 W 2 2 4 W 3 3 5 L 4 6 6 L 5 7 W 6

<tbody>
</tbody>

The ARRAY formula (enter using CTRL+SHIFT+ENTER) in E2 is:

=IFERROR(INDEX(B\$2:B\$7,SMALL(IF(A\$2:A\$7=D\$2,ROW(B\$2:B\$7)-ROW(B\$2)+1),ROWS(B\$2:B2))),"")

and copied down. When the formula runs out of matching values it will generate a blank.

Obviously you can put what is in D1:E5 onto a separate, new sheet if you want.

Regards

Murray

Last edited:

#### ATSJ

##### Board Regular
Thank you, works perfectly and I appreciate it.

Hi

Consider the following:
 A B C D E 1 Code Value Criteria 2 W 1 W 1 3 W 2 2 4 W 3 3 5 L 4 6 6 L 5 7 W 6

<tbody>
</tbody>

The ARRAY formula (enter using CTRL+SHIFT+ENTER) in E2 is:

=IFERROR(INDEX(B\$2:B\$7,SMALL(IF(A\$2:A\$7=D\$2,ROW(B\$2:B\$7)-ROW(B\$2)+1),ROWS(B\$2:B2))),"")

and copied down. When the formula runs out of matching values it will generate a blank.

Obviously you can put what is in D1:E5 onto a separate, new sheet if you want.

Regards

Murray

Replies
3
Views
1K
Replies
4
Views
466
Replies
3
Views
570
Replies
5
Views
872
Replies
1
Views
211

1,191,366
Messages
5,986,238
Members
440,012
Latest member
StumpedGump1987

### 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.

### Which adblocker are you using?

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

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