Export rows to new sheet based on value from list of cells

E

EdwinZ

Hello All,

I have been browsing, but cannot find the solution.. Here is the case:

I have an access database export, which I need devided up in parts,
based on cell values in one of the rows of the db extract. These
entire rows should be exported to a new sheet..

So:

I have a small table on sheet 1:

Netherlands
Belgium
Luxembourg

and a big bad database with countries in column B, on sheet 2..

What I would like is to make a macro, which starts looking for the
first value (Netherlands) in the database, and exporting the matching
rows to a new sheet. And when done, starts to look for Belgium and
copies those results under the Netherlands rows in the new sheet. And
so on, and so on ;)

Hope somebody can help me out on this one, it would really be a help!

Regards
Edwin
 
E

Edwin van der Zwaard

Thanks Ron,

However when I try to use your macro (simple version, test1) I get an
error this error:

Compile error:

Sub or function not defined

I copied your input and only modified the required part.. What am I
doing wrong?

Thank you for your help!!

Regards
Edwin
 

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