+ Reply to Thread
Results 1 to 7 of 7

Filter data with conditions

  1. #1
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Filter data with conditions

    Hi,

    I need to do this :
    - see if Unique F3:F500 is in Part, at J3
    - then for Unique F3:F500, need to have FIRST Max of G3:G500, at K3 and then Max of H3:H500 at L3
    - so I got this , but I need to COMPARE G3:G500 with C (Nr1) and H3:H500 with D (Nr2), here I need HELP

    Relation is this G > C and H > D

    In attached a2, is removed because 2 (K3) = 2 (C4) But 23 (L3) < 24 (D4)

    Or :
    a7 is in list because 6 (K4) > 5 (C5)
    c3 is in list because 8 (K5) = 8 (C8) But 4 (L5) > 3 (D8)

    So SORT FILTER UNIQUE F3:F500 which are in Part, keep MAX G3:G500 and H3:H500 ( I believe I have this at J3:L500 )

    and then keep ONLY G>C and or if G=C then keep H>D (I do not have this)

    Thank you all
    Attached Files Attached Files

  2. #2
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Filter data with conditions

    Please try

    =LET(p,Data[Part],c,F3:F500,M_1,MAXIFS(G3:G500,c,p),M_2,MAXIFS(H3:H500,c,p),FILTER(CHOOSE({1,2,3},Data[Part],M_1,M_2),(M_1>Data[Nr1])+(M_2>Data[Nr2])))
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Filter data with conditions

    Thank you so much.
    However I made a mistake in my explanation, regarding MAX H3:H500, please see attached

    Please see a7
    I need MAX of G3:G500 as driving condition, which is 6
    So I have Result together a7-6
    Then (here was my mistake) I need MAX of H3:H500 for Result, which is 4

    So not MAX of H3:H500 for a7, but for a7-6

    So my L column is mistake

    The way I was explaining before , MIX/alter the records
    Attached Files Attached Files
    Last edited by ionelz; 10-17-2021 at 02:18 PM.

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Filter data with conditions

    Try

    =LET(p,Data[Part],c,F3:F500,n_1,G3:G500,M_1,MAXIFS(n_1,c,p),M_2,MAXIFS(H3:H500,c,p,n_1,M_1),FILTER(CHOOSE({1,2,3},Data[Part],M_1,M_2),(M_1>Data[Nr1])+(M_2>Data[Nr2])))
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Filter data with conditions

    Thank you , that is what I wanted !
    If you do not mind, one more question
    Your Formula is for Unique F which exist in B (Part)

    I need a more simple formula :

    Sort Unique Filter of F3:F500 , which are not in Part , and then MAX of G, then Max of Result...

    In attached J and K I hope is "correct"

    L no, because of reason above I need max of H relative to result to "Result" F,G

    Too many words... so all I need at L3 is : MAX H3:H500 of J:K in F:G
    Attached Files Attached Files
    Last edited by ionelz; 10-17-2021 at 07:11 PM.

  6. #6
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: Filter data with conditions

    try

    =LET(c,F3:F20,n,G3:G20,z,UNIQUE(FILTER(c,ISNA(MATCH(c&"",Data[Part]&"",)))),m,MAXIFS(n,c,z),SORT(CHOOSE({1,2,3},z,m,MAXIFS(H3:H20,c,z,n,m))))
    Attached Files Attached Files

  7. #7
    Forum Contributor
    Join Date
    05-20-2016
    Location
    Detroit
    MS-Off Ver
    Office 365 Version 2008 (July 2020)
    Posts
    819

    Re: Filter data with conditions

    Bo, thank you for your HELP, works great !

+ 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. Pulling forward data under filter conditions
    By rjerand in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-25-2021, 10:45 PM
  2. [SOLVED] How to filter data based on multiple conditions
    By Mr. Z in forum Excel General
    Replies: 3
    Last Post: 07-22-2021, 12:40 PM
  3. Replies: 1
    Last Post: 04-23-2020, 03:44 PM
  4. FIlter data based on various conditions
    By Vivek2705 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2019, 03:40 AM
  5. Need help to filter and display data based on multiple if conditions
    By tichtoe in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-08-2018, 02:29 AM
  6. [SOLVED] Vba to advance filter data on multiple conditions to many sheets with naming convention
    By 4gurus in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-27-2013, 01:01 PM
  7. Filter data by complex conditions.
    By tezr in forum Excel General
    Replies: 8
    Last Post: 08-17-2010, 01:42 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