+ Reply to Thread
Results 1 to 13 of 13

The easiest way to extract data from one tab to many... ?

Hybrid View

  1. #1
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Question The easiest way to extract data from one tab to many... ?

    Hello,

    I have a following problem:

    One tab with football results:

    Div Date HomeTeam AwayTeam FTHG FTAG FTR
    E0 14/08/2010 Aston Villa West Ham 3 0 H
    E0 14/08/2010 Blackburn Everton 1 0 H
    E0 14/08/2010 Bolton Fulham 0 0 D
    E0 14/08/2010 Chelsea West Brom 6 0 H
    E0 14/08/2010 Sunderland Birmingham 2 2 D
    E0 14/08/2010 Tottenham Man City 0 0 D
    E0 14/08/2010 Wigan Blackpool 0 4 A
    E0 14/08/2010 Wolves Stoke 2 1 H
    E0 15/08/2010 Liverpool Arsenal 1 1 D
    E0 21/08/2010 Arsenal Blackpool 6 0 H
    .
    .
    .

    And it goes on for a few thousands records.

    My questions is... What's the easiest way to extract data for each team to separate tabs?

    E.g. I have a tab "Arsenal" and I need to have all their matches (home and away) in that tab. Same for every other team.

    Thank you!

  2. #2
    Forum Contributor
    Join Date
    03-27-2012
    Location
    Canada
    MS-Off Ver
    Excel 2010
    Posts
    154

    Re: The easiest way to extract data from one tab to many... ?

    Hi,

    try the attached...i assume home team is in column C and it has all their games listed?
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: The easiest way to extract data from one tab to many... ?

    This works beautifully!

    But it solves only half of the problem - it sorts only home games. So in every tab, there are only games that those teams play at home.

    So rather than having 38 matches, I have only 19 in every tab.

    Any solution, so it does both home and away games - in other words, could it assign the one row for both tabs of the home and away teams?

    Thank you so much!

  4. #4
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: The easiest way to extract data from one tab to many... ?

    Here is an example file to sort out...

    Thank you
    Attached Files Attached Files

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: The easiest way to extract data from one tab to many... ?

    I completely forgot Burnley were on the top flight three years ago and do not know where they are now. Time flies!
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: The easiest way to extract data from one tab to many... ?

    Hi, true. They are in the Championship

    Thanks for your help.

    Still it does it only for home games...

    I need it to have both: home and away:

    e.g. Arsenal:

    E0 15/08/2009 Everton Arsenal 1 6 A
    E0 22/08/2009 Arsenal Portsmouth 4 1 H
    E0 29/08/2009 Man United Arsenal 2 1 H
    E0 12/09/2009 Man City Arsenal 4 2 H
    E0 19/09/2009 Arsenal Wigan 4 0 H
    E0 26/09/2009 Fulham Arsenal 0 1 A
    E0 04/10/2009 Arsenal Blackburn 6 2 H
    E0 17/10/2009 Arsenal Birmingham 3 1 H
    E0 25/10/2009 West Ham Arsenal 2 2 D
    E0 31/10/2009 Arsenal Tottenham 3 0 H
    E0 07/11/2009 Wolves Arsenal 1 4 A
    E0 21/11/2009 Sunderland Arsenal 1 0 H
    E0 29/11/2009 Arsenal Chelsea 0 3 A
    .
    .
    .

    Any other ways?

  7. #7
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: The easiest way to extract data from one tab to many... ?

    Okay! Will back soon

  8. #8
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: The easiest way to extract data from one tab to many... ?

    Try the attached.
    Amended and commented where you need to change the line for different sheet
    Attached Files Attached Files
    Last edited by AB33; 04-29-2013 at 08:21 AM.

  9. #9
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: The easiest way to extract data from one tab to many... ?

    That's fantastic! Does what I want it to do! Thank you so much!

    Just will need a little more help here. I changed the name in the vba for different file and it worked, but created 40 extra empty tabs.

    Could I have a version of the vba that I could use on any file without changing the vba?

    Or if not, could you tell me what should I change to work it on every other files.

    Best Regards and many thanks

  10. #10
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: The easiest way to extract data from one tab to many... ?

    That's actually a genius solution. When you add now data and run vba, it updates the tabs rather than creating multiple new ones!

    Suberb work! I'm really grateful

    Will have a play around to make it work for other files and if I have more questions, I will get back. Cheers!

  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: The easiest way to extract data from one tab to many... ?

    Amended above

  12. #12
    Registered User
    Join Date
    02-22-2011
    Location
    Chester
    MS-Off Ver
    Excel 2007
    Posts
    46

    Re: The easiest way to extract data from one tab to many... ?

    Top help! Thank you very much.

    Have a great day sir!

  13. #13
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: The easiest way to extract data from one tab to many... ?

    Jak,
    You are welcome!

    Could you please now close (Mark) this thread as solved? Go in to the top right-hand side of this page, choose "Thread Tools" from the menu, then select "solved" from the drop down menu.

+ 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