Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Export rows to new sheet based on value from list of cells

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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Export rows to new sheet based on value from list of cells

Hi EdwinZ

I have code here to import
http://www.rondebruin.nl/accessexcel.htm

You can replace the string with a cell value

Instead of enter field values in the code you can also use a cell value
"ShipVia", "=", Sheets("Sheet1").Range("A2").Value

And you can use a function from this page to make a destination cell
http://www.rondebruin.nl/last.htm



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"EdwinZ" wrote in message oups.com...
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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Export rows to new sheet based on value from list of cells


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




*** Sent via Developersdex http://www.developersdex.com ***
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy rows from one Data sheet to another sheet based on cell conte John McKeon Excel Discussion (Misc queries) 2 May 15th 10 06:49 AM
Search for rows in one sheet and copy into another sheet based on customer id [email protected] Excel Worksheet Functions 1 October 22nd 07 03:09 AM
Copy Rows to New Sheet based on User Selection in Drop-down List Carlee Excel Programming 0 April 2nd 07 04:46 PM
List rows in an order based on a cells value Josh M Excel Discussion (Misc queries) 0 September 14th 05 04:51 PM
how to find and copy values on sheet 2, based on a list on sheet 1 evanmacnz Excel Programming 4 February 7th 05 08:33 PM


All times are GMT +1. The time now is 02:46 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"