+ Reply to Thread
Results 1 to 6 of 6

Using Formulas to extract data

  1. #1
    Forum Contributor
    Join Date
    12-05-2006
    Location
    London
    MS-Off Ver
    Excel 365 (Version 2008) [work] & 365 [home]
    Posts
    189

    Using Formulas to extract data

    Morning all,

    I have a VERY large database of results for a club.

    I want to be able the extract the results and info from the Data tab and show it on a separate sheet. I have the main bit set up like:
    • a named range for the teams played against
    • The area and sheet I want the results displayed
    • The data validation list dropdown to select the team

    Now comes the problem. I have tried to look up how to do this on YouTube and google and looks like I need to be using things like Index, match, vlookup and combining them in to one big functions but I've gotten more confused the more I read and watch.

    I have attached a sample of data in excel and I have put annotation in a text box for clarity.

    Can someone help please ?

    Thanks in advance,

    N.

    EDIT: I am open to it being a vba if this will be better to search and help stop the excel taking an age to open.
    Attached Files Attached Files
    A mad football researcher and Statistician - ok just mad really !

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Formulas to extract data

    In E2, copied across to N2 and down:
    =IFERROR(INDEX(Data!A:A,AGGREGATE(15,6,ROW(Data!$C$2:$C$30)/(Data!$C$2:$C$30=$A$2),ROWS($1:1))),"")

    In O2, copied across to and down:
    =IFERROR(INDEX(Data!K:K,AGGREGATE(15,6,ROW(Data!$C$2:$C$30)/(Data!$C$2:$C$30=$A$2),ROWS($1:1)))&"","")
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Contributor
    Join Date
    12-05-2006
    Location
    London
    MS-Off Ver
    Excel 365 (Version 2008) [work] & 365 [home]
    Posts
    189

    Re: Using Formulas to extract data

    WOW thanks Glenn for the quick reply and the info.

    I am looking at both formulas and can only see one difference and that is in the second one it has &"" which I'm a bit confused on.

    Right so the maximum the team has played an opponent is about 280 times (my data goes back to 1926) therefore so I will need to copy it all the way down to line 281 (maybe 290 for safety).

    Thanks again

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Formulas to extract data

    Correct. The &"" turns 0, in cells where there is no match, and whereyou are expecting a TEXT result, into a blank. Without it you'd see a sea ofzeros.

    To copy down, just adjust the range $C$30 to suit your raw data... and away you go.

  5. #5
    Forum Contributor
    Join Date
    12-05-2006
    Location
    London
    MS-Off Ver
    Excel 365 (Version 2008) [work] & 365 [home]
    Posts
    189

    Re: Using Formulas to extract data

    Your formula: =IFERROR(INDEX(Data!A:A,AGGREGATE(15,6,ROW(Data!$C$2:$C$30)/(Data!$C$2:$C$30=$A$2),ROWS($1:1))),"")

    I have changed it to suit the actual DB:

    =IFERROR(INDEX(Data!F:F,AGGREGATE(15,6,ROW(Data!$H$2:$H$5000)/(Data!$H$2:$H$5000=$A$2),ROWS($1:1))),"")

    And it is working

    =IFERROR(INDEX(Data!K:K,AGGREGATE(15,6,ROW(Data!$C$2:$C$30)/(Data!$C$2:$C$30=$A$2),ROWS($1:1)))&"","") is now changed to

    =IFERROR(INDEX(Data!P:P,AGGREGATE(15,6,ROW(Data!$H$2:$H$5000)/(Data!$H$2:$H$5000=$A$2),ROWS($1:1)))&"","")

    Also working.

    I've got a few other bits to add to the sheet stat wise so I maybe back

    Thanks Glenn you're a star

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Using Formulas to extract data

    That should do it all! You're welcome and thanks for the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formulas to extract data from one sheet to multiple sheets within an excel workbook
    By LukeFerry in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 10-06-2015, 05:36 AM
  2. [SOLVED] Extract data like filter by formulas
    By YasserKhalil in forum Excel General
    Replies: 5
    Last Post: 09-03-2015, 05:15 PM
  3. [SOLVED] Need formulas to extract data based on special characters
    By GrisCorp in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-26-2015, 02:54 PM
  4. Replies: 7
    Last Post: 01-12-2015, 02:48 PM
  5. Replies: 0
    Last Post: 07-28-2014, 10:19 PM
  6. Using formulas to extract data meeting 2 specific criteria
    By Levie in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-01-2012, 09:27 PM
  7. Replies: 3
    Last Post: 08-28-2008, 09:05 AM

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