+ Reply to Thread
Results 1 to 9 of 9

Extract Data from worksheet & copy to workbooks

  1. #1
    Forum Contributor
    Join Date
    05-24-2010
    Location
    London England
    MS-Off Ver
    Excel 2003
    Posts
    345

    Extract Data from worksheet & copy to workbooks

    Hi there.

    I was wondering if someone can help me with the following problem please.

    Basically I have data sheets, which has things like Area, Region, spend etc. Each line has a unique identifier.

    I then have a seperate workbook for each Area/Region.

    What I would like to do, is exttract the relevent data for that Region/Area from the data sheet and put it into the Area/Region workbook, without haviong to cut and paste a million times, because there is a lot of data.

    Is this possible at all?

    Thank you.
    Last edited by pike; 07-13-2010 at 06:18 AM. Reason: change title for newbie

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Extract Data from worksheet & copy to workbooks

    All of this is possible and probably done frequently. I have several macros on my website that might assist.

    I would recommend parsing the data from your master worksheet to separate SHEETS in the same workbook, much easier to manage. Here's a macro for that:I would work with the main sheets in one workbook for expediency. You can copy sheets to individual workbooks later, for dispersal, here's a macro that does that:
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Contributor
    Join Date
    05-24-2010
    Location
    London England
    MS-Off Ver
    Excel 2003
    Posts
    345

    Re: Extract Data from worksheet & copy to workbooks

    Thanks a lot for that I will try that very soon. That is where I wanted to end up.

    In some cases I am already at that stage without using macros but using v-look ups.

    And I wondered how you would get the tab from that spreadsheet which has come from the master data tab, into a new workbook entirely?

    Ideally also I'd like a macro that send out these work books once they are completed, but noit sure if that is possible either.

    thanks for the help will give some of it a bash now.

    got my first VBA course in a few weeks so hopefully after that I can reciprocate some of the help I have recieved on here to others.

  4. #4
    Forum Contributor
    Join Date
    05-24-2010
    Location
    London England
    MS-Off Ver
    Excel 2003
    Posts
    345

    Re: Extract Data from worksheet & copy to workbooks

    Sorry. You're talking to a bit of a macro noob here, so apologies if this sounds like a stupid question.

    But how does that macro or code, know what I want it to do specific to my needs? Because isn't it based on criteria that you have set it?

    Sorry, that may have sounded confusing-basically i'm asking whether that what you have posted is the principle behind the idea which needs editing for my own personal needs, or that is exactly it?

  5. #5
    Forum Contributor
    Join Date
    05-24-2010
    Location
    London England
    MS-Off Ver
    Excel 2003
    Posts
    345

    Re: Extract Data from worksheet & copy to workbooks

    Ok I tried running it and got a bug error at this juncture

    "ws.Range(vTitles).AutoFilter Field:=vCol, Criteria1:=MyArr(Itm)"

    Any ideas on how to edit please?

    the second macro worked perfectly. Although what I need to do now, is the same for other pieces of data and save them next to or in a specific order to the ones previously done. anyway to do this also?

    Sorry I know that's a lot of questions.
    Last edited by floricita; 07-13-2010 at 10:54 AM.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Extract Data from worksheet & copy to workbooks

    How are you wanting to edit it? What needs to change?

  7. #7
    Forum Contributor
    Join Date
    05-24-2010
    Location
    London England
    MS-Off Ver
    Excel 2003
    Posts
    345

    Re: Extract Data from worksheet & copy to workbooks

    Hi.

    Sorry I am really bad at this at the moment and still trying desperately to learn.

    The first one I have managed to get to work for my spreadsheets.

    The second one works, but it produces it in a single new spreadsheet.

    Ideally what I want is for it to go into an existing worksheet as a new tab. Then repeat for the other reports I have to do to put them all into one spreadsheet.

    So in thoery I mean

    I have reports A,D,C to run. They are all different but need to be compiled together in one spreadsheet by region, for examples sake, I have regions D,E and F.

    I do stage one for each report giving me a seperate report for each region. That leaves me with 3 different reports per region. And I need all the reports for that region in one spreadsheet.

    So I need Region D as one report containing reports ADC, then for Region E and so on.

    Is this possible do you know?

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Extract Data from worksheet & copy to workbooks

    Yes of course, everything is possible. I pointed you to my macros to get you started constructing one for yourself that does exactly what you need, published macros seldom work "out of the box" for every need, they need a bit of tweaking, or wholesale rewriting using the techniques you learn from the published macros.

    It's meant to be a resource, not always a turn-key solution.

    If you're looking for something done completely for you, you will need to post example workbooks with complete BEFORE/AFTER examples, something we can see clearly.

    Click GO ADVANCED and use the paperclip icon to post up a desensitized copy of your workbook.

  9. #9
    Forum Contributor
    Join Date
    05-24-2010
    Location
    London England
    MS-Off Ver
    Excel 2003
    Posts
    345

    Re: Extract Data from worksheet & copy to workbooks

    Thanks.

    Unfortunately it said a security token was missing when I tried this.

    Thanks for your help though, I will endeavour with the challenge.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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