Closed Thread
Results 1 to 2 of 2

VBA to filter data in a source file using data from another workbook then create new filte

  1. #1
    Registered User
    Join Date
    06-09-2015
    Location
    England
    MS-Off Ver
    2010
    Posts
    8

    VBA to filter data in a source file using data from another workbook then create new filte

    Hi There,

    Ive been asked to organize some daily data and it comes in large bulks of about 6000 rows a day. I need to organize this data into filtered worksheets so as I can send it to each specific area dealing with the reservations. I have been doing it manually for a while now but I know if I can get assistance in creating a VBA module / code to simplify this it would make it a lot easier.


    What I am trying to achieve is I have 1 workbook which lists the branches (Column "GpBr") within various areas of business. I would like to use this workbooks list to filter the daily of bulk data I get.

    Branches & Areas.xlsx

    Area GpBr
    A U100
    A U101
    B U102
    B U103
    C U104
    D U105


    So the above is an example of a few branches (Column "GpBr") / Areas they are in the above table is in a workbook called "Branches & Areas.xlsx". So I need a VBA module /button to open up the daily bulk of data, filter the results by branches (Column "GpBr") listed in the above table, sort into individual Areas matching the branches (Column "GpBr") in the above table and copy each area to an individual worksheet in a new workbook. The only tricky bit here is in the daily bulk data there isn't an Area column so I will have to use an "IF" Statement possibly to achieve this. But im really not sure how.


    My Daily Bulk Data Source is in a file called "All Data Source.xls" and contains the below headers with about 6000 rows of data.

    Example Data Source.xlsx

    Status Group GpBr Bill To Name Ticket-Reservation C Status R Created Date D Last Name C Vehicle Reg C Number P Comment R Comment S Name P Number Extension Preferences
    U100
    U101
    U102
    U101


    So when I get this daily data I would like to be able to just save it to my hard drive. Open up my first workbook (the 1st example) - click a button and it pulls all the information from the above workbook into new workbook, filtered by Branches (Column "GpBr") that ONLY appear in my "Branches & Areas.xlsx" (top example) and then save the filtered branches (Column "GpBr") into their specific Area which will be put into Area specific worksheets.


    I have tried to find various modules and I found a button module which uses a text box input. Like this.

    Please Login or Register  to view this content.

    but the above code only works if I have the code in the daily bulk file. I don't know how to get it to search another workbook. But I also found this code.


    Please Login or Register  to view this content.
    I believe the above code is more suitable but again I don't know how to put it into my "Branches & Areas.xlsx" workbook to filter the bulk data from "All Data Source.xls" by branch and then create a new Workbook with branches (Column "GpBr") put into their rightfull areas into individual worksheets.

    Any help would be grateful.

    Thank you kindly

    Sara x

  2. #2
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: VBA to filter data in a source file using data from another workbook then create new f

    Welcome to the Forum, unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 01-09-2015, 06:36 PM
  2. Copy, edit and save workbook to same location as source data file, not macro file.
    By Jasonhouse in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-02-2014, 09:01 AM
  3. Replies: 0
    Last Post: 03-20-2014, 10:03 AM
  4. Replies: 1
    Last Post: 11-12-2010, 01:09 PM
  5. create a list drop down with the source data from another workbook?
    By ravihotwok in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-11-2009, 10:34 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1