+ Reply to Thread
Results 1 to 9 of 9

Function to extract a list of data from another list of data

  1. #1
    Registered User
    Join Date
    10-16-2012
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2010
    Posts
    27

    Function to extract a list of data from another list of data

    As the title reads, I am trying to extract a list of data from another list of data that meets specific criteria.

    For instance, the "original data" may have 100 lines of data with the following columns - "Name" "Date" "Action" "Comment" "Status".
    On a different sheet, I want to show the (1) most recent 10 data that (2) has Name "ABC" and (3) Status is "Done".

    I thought I had this working by using
    {=LARGE(IF('Sheet1'!$A$2:$A$500=$E$3,IF('Sheet 1'!$H$2:$H$500="Done",'Sheet 1'!$F$2:$F$500)),11-ROW(A1))} for "Date"
    and
    {=INDEX('Sheet 1'!B$2:B$500,MATCH($E$2&$F25,'Sheet 1'!$A$2:$A$500&'Sheet 1'!$F$2:$F$500,0))}

    However, I realized that when there are more than one same values for "Date", the second formula does not work. Please refer to the attachment (highlighted parts).

    I'm thinking I need a different approach to this. I would appreciate any suggestions.

    Thanks!
    Attached Files Attached Files

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Function to extract a list of data from another list of data

    Hi Tekobayashi,

    Which sheet tab you are talking about ?
    Where is your source data and where you need formula to be applied... ? Thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    10-16-2012
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Function to extract a list of data from another list of data

    Sorry for the lack of explanation.

    The raw data is on sheet "Recruiting Tasks".

    On sheet "Partner Overview" under section named "Recent Recruiting Activities", I want to show the 8 most recent "activities" completed for partner on E3, which is Partner A.

    What I have done is to search for all the "Plan Dates" in the raw data ("Recruiting Tasks") for Partner A that are marked as "completed" (column H in "Recruiting Tasks" sheet). Then used INDEX and MATCH functions to fill in the rest of the fields that match this plan date. However, when there are 2 identical plan dates, I realized the other fields do not recognize that this is a different data set and shows the same information.

    On Row 25 ("Partner Overview"), it SHOULD be "E-mail", "Comment 4", "Kobayashi", "Team A", "2012/9/16" and "2012/9/20" (refer to Row 6 of "Recruiting Tasks"). However, it is showing the data from row above, because it has the same plan date.

    Thanks for your help.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Function to extract a list of data from another list of data

    Both of your current formula is merged together and try the below single cell formula

    In B24 cell - Array Formula - Requires Ctrl+Shift+Enter

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down and right.

    To Mask Error
    B24 cell - Array Formula - Requires Ctrl+Shift+Enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down and right.
    Last edited by :) Sixthsense :); 11-14-2012 at 06:10 AM. Reason: Added Error Mask


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Registered User
    Join Date
    10-16-2012
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Function to extract a list of data from another list of data

    WOW! This works perfectly. I'm just having a hard time understanding the logic and why this works...

    One question though, in this case, the output section and raw data section are organized in the same manner (Action / Details / Performed by / Team / Plan Date / Comp. Date / Status). What if the raw data has more data fields (in different order), but I would just like to pick up specific data fields? Do I just modify the Row(A1) Column (A1) to match the location of the desired data in the raw data set?
    Last edited by tekobayashi; 11-14-2012 at 09:08 PM.

  6. #6
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Function to extract a list of data from another list of data

    Thanks for the feedback!

    Initially I preferred to write the formula to pick the data based on the column headers, but there is mismatch of column headers in some of the fields (i.e.)

    Partner Overview-Details, Comp. Date
    Recruiting Tasks-Detail, Completion Date.

    At the same time I seen both of your Base and Output data columns are same so just rotated it using column() function.

    Now the below formula's are replaced with match function to get the column #.

    Below is the revised version of formula which will get the result based on the column header.

    In B24 cell - Array Formula - Requires Ctrl+Shift+Enter
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down and right.

    Or

    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down and right.

  7. #7
    Registered User
    Join Date
    10-16-2012
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Function to extract a list of data from another list of data

    Thank you so much for your help, and sorry for the late response. The formulas you suggested does wonders for my workbook.

    One additional question - how would I modify this if I were to adopt this to a sheet where the raw data sheet columns are different to the output sheet?

    That is, currently I have Action / Details / Performed by / Team / Plan Date / Comp. Date / Status on both the raw data sheet and output sheet. However, if the raw data sheet had, for example, 40 columns and I only want to extract the Action / Details / Performed by / Team / Play Date / Comp. Date / Status, how would I modify this formula?

    Thank you so much for your help.

  8. #8
    Registered User
    Join Date
    10-16-2012
    Location
    Tokyo, Japan
    MS-Off Ver
    Excel 2010
    Posts
    27

    Re: Function to extract a list of data from another list of data

    Hello, I've tried using the forumla you suggested on the attached file.

    The idea is the same as the Excel worksheet you helped me with, however the difference is that the raw data sheet has a lot more columns (Sheet "Data"). I tried creating a new sheet "Data_Sorted" to only pick up the columns that I need, then used your formula into the "Output" sheet.

    The "Output" sheet is supposed to do the exact same thing as the previous file you helped me with, but the difference is that I want it to extract the data that has Comp. Date between the two dates specified on this sheet (F1 and F3). I tried forgetting about this new requirement first to see if your formula works as it is, and it's not working for me. I was wondering if you could help.

    Thanks!
    Attached Files Attached Files

  9. #9
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Function to extract a list of data from another list of data

    Sumproduct caused the error so replaced it with another array (Index & Match), so revised formula is given below.

    In B7 cell
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Drag it down and right.

+ 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