+ Reply to Thread
Results 1 to 5 of 5

Extracting Data Subject to Conditions

  1. #1
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    812

    Extracting Data Subject to Conditions

    Hi,

    I have data in sheets "firm 1" and "firm 2" and would like to use formulae to extract the top and bottom 5 performance for each sector as shown in Sheet1.

    The formulae in column B in Sheet1 would have to look in both adjacent sheets and return the largest and smallest 5 values for each sector and then formulae in column A would return the names associated with these values.

    Can someone please suggest formulae to accomplish this.

    Thanks!
    Attached Files Attached Files

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Extracting Data Subject to Conditions

    This is very difficult to do with data distributed across two sheets. In fact I do not know how to do that.

    In this solution I have combined the two sheets into one, adding a firm identifier. The formula to determine the top and bottom 5 uses an array formula. After typing in the formula, do not hit ENTER--hit CTRL+SHIFT+ENTER. You have done it correctly if the formula in the formula box has {braces} around it. You cannot type in the braces; they are just an indicator that it is an array formula.

    {=LARGE(IF(Combined!D:D=Sheet1!C2,Combined!C:C,-9999),ROWS(A2:A2))}

    Once we find the value, then we use another array formula to look up the combination of the value and the sector

    {=INDEX(Combined!B:B,MATCH(B2&C2,Combined!C:C&Combined!D:D,0))}
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Forum Contributor
    Join Date
    02-08-2005
    MS-Off Ver
    Microsoft 365
    Posts
    812

    Re: Extracting Data Subject to Conditions

    Thank you!

  4. #4
    Banned User!
    Join Date
    02-05-2015
    Location
    San Escobar
    MS-Off Ver
    any on PC except 365
    Posts
    12,168

    Cool Re: Extracting Data Subject to Conditions

    another way with PowerQuery & PivotTable:

  5. #5
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Extracting Data Subject to Conditions

    I forgot to attach the file.
    Attached Files Attached Files

+ 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. Extracting data with two conditions
    By Jacehigh in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 07-31-2017, 08:26 AM
  2. [SOLVED] Extracting data from a string using conditions
    By Terry-J in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-16-2017, 06:22 PM
  3. [SOLVED] Help comparing two files by subject+Date, subject+DatePlus1, Subject+DateMinus1
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 07-11-2017, 07:37 AM
  4. Extracting data giving conditions
    By Nero_slk in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-14-2013, 10:26 AM
  5. Extracting unique data that meets specific conditions
    By tekobayashi in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-07-2013, 08:44 AM
  6. Help with Extracting Subject from Email and Exporting to Excel
    By jbeans in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-27-2013, 01:33 PM
  7. Extracting data from all emails with a specific subject
    By kefalo in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-29-2010, 06:14 PM

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