> two filter conditions

J

Jen

complete newbie to macros and vb, so bear with me I'm
trying to learn :)

my problem;

say you have a list of say 50 names all with associated
rows of data, how do you write a macro to -
look down the "name field" to see if any of say 10
specific names are present and if they are, to filter
these rows out and place in another worksheet?

added problem (1)- these names may or may not appear in
the "name field" in different worksheets AND they will not
always appear in the same place in the list

added problem (2)- the spreadsheets contain hidden columns
and i only want to select visible columns (having tried a
cut and paste macro i have had problems with hidden header
fields becoming visible and the fact the cell position
changes between worksheets)

The advanced filter will only let me select two "names" to
filter out and although i have tried to add extra names
using xlOR commands, I'm obviously not getting anywhere!

Advice much appreciated...

Thanks in advance,
Jen
 
D

Debra Dalgleish

The advanced filter doesn't limit you to two names -- you could create a
criteria range with as many names as you need to filter.

On the destination sheet, add the headings for the columns that you want
to include. If a column heading is omitted, the data from that column
won't be extracted by the filter.

Start the advanced filter from the destination worksheet, and select a
cell that is not adjacent to the cells with the headings.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top