Extracting data from multiple worksheets

R

R NG

I have a workbook with 3 worksheets, WS1, WS2 and an empty worksheet.
I need to extract rows meeting some criteria from WS1 and WS2 to the empty
worksheet.

To simplify things a little, WS1 is as follows
col1 col2 col3
1 2 a
2 4 b
1 6 c

WS2 is as follows:
col1 col2 col3
4 2 d
6 5 c
2 3 b
1 5 c

I need to extract the rows from WS1 and WS2 with col3 equal to "c", and
display them in the empty worksheet. The result is:
col1 col2 col3
1 6 c
6 5 c
1 5 c

How do I do that using VBA?
 
D

Don Guillett

For each sheet Use data>filter>autofilter>filter col 3 for c>copy to next
avail row on sh 3. Record a macro if desired and then clean it up.
 
R

R NG

Hi Don,

Your post gave me the idea of using filtering. As my criteria is actually
much more complex, I explored advanced filtering and found that that's
exactly what I need. Thank you very much. :)
 

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