+ Reply to Thread
Results 1 to 5 of 5

Complex data extraction from a table

  1. #1
    Registered User
    Join Date
    03-12-2013
    Location
    Rotherham, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Complex data extraction from a table

    Hi there Excel people!

    I'm trying to find a way of pulling out bits of data from a table but I can't figure out how to do it! I've put 'complex' in the subject but it might not be for people in these forums.

    I'm working on a dinner register and I've attached an example of the data I'm looking at. Basically I want people to be able to add a 'week ending' date into cell AD3 and the 'dinners' column (AE) populates each day of the week from row 4 from the correct table. I'm not sure on the formula to use in AE4 - AE9 to achieve this. HLOOKUP will pull data from below the date but not for each day. Would INDEX and/or MATCH work? It's no problem if I need to alter the format or orientation of the tables.

    I hope this makes sense! Any help appreciated!
    Attached Files Attached Files
    Last edited by Corke; 03-14-2013 at 11:50 AM.

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Complex data extraction from a table

    Hi and welcome to the forum

    Try this, copied down...

    =OFFSET($A$1,MATCH($AE$3,$A$1:$A$11,0)-1,MATCH($AD$3,$A$1:$AB$1,0)-6+ROW(A1)-1)

    BUT, make sure you change the name in A4 to match the heading in the 2nd table. I have set it up so that you can just change the heading in AE3 and it will pull out the relevant data

    let me know how you make out?
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Complex data extraction from a table

    With the date in AD3
    In AE4 copied down
    =OFFSET(INDEX($B$1:$AB$1,MATCH($AD$3,$B$1:$AB$1,0)),3,ROW(A1)-6,1,1)

    and in AF4 copied down
    =SUM(OFFSET(INDEX($B$1:$AB$1,MATCH($AD$3,$B$1:$AB$1,0)),5,ROW(A1)-6,2,1))
    See attachment
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  4. #4
    Registered User
    Join Date
    03-12-2013
    Location
    Rotherham, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Complex data extraction from a table

    Thank you both for the replies. I'll not get chance to look at this properly until tomorrow so I'll give my full attention then and mark as solved as appropriate.

  5. #5
    Registered User
    Join Date
    03-12-2013
    Location
    Rotherham, England
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Complex data extraction from a table

    I'll be using ChemistB's solution as this doesn't require changing headings but thanks again to you both for the input. I just need to get my head round what it's doing so I can use something similar in other spreadsheets!

    Expect more questions in the future

+ 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