View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
ksh ksh is offline
external usenet poster
 
Posts: 16
Default Copy data to another wb based on specific criteria

I realized this post should be in the programming questions and I have
created a new entry there.

"ksh" wrote:

Each month I receive 6 workbooks of data. Each workbook is based on data
type and has the data listed by country within each workbook. I have to
create a workbook for each country which has a spreadsheet within each for
the separate data types but only includes that countrys data.

Example of 1 workbook
CTY PCC NAME CATERGORY LNIA
AR 1536 ARGENTINA-MAIN INACTIVE TA B9F9
AR 2180 ARGENTINA-MAIN INACTIVE TA 35A9
AR R150 ARGENTINA-MAIN INACTIVE TA 36A8
BR AC12 BRAZIL-SA3 INACTIVE TA 9RE7
BR B220 BRAZIL-SA3 INACTIVE TA 9RE7
BR 1780 BRAZIL-SA3 INACTIVE TA 9RE7
BR R100 BRAZIL-SA3 INACTIVE TA 9RE7
CL Q150 TURISMO-A INACTIVE TA 1510
CL A200 TURISMO-A INACTIVE TA 1510
CL 2105 TURISMO-A INACTIVE TA 1510

Currently I manually open each workbook put an auto filter on the worksheet,
filter by country, and then copy the filtered data into that countrys
workbook.

I can do this by formula, but it is very cumbersome and creates a huge
worksheet once I try to incorporate all countries and data types. Is there a
way to do this in VBA.

I currently use excel 2003 and have a limited amount of VBA experience.