Results 1 to 11 of 11

Thread: Counts min and max quantity of equals 'strings' based on a filter column

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    443
    Location
    Aussie, I tried suggestion.

    The unique list repeats the 000001 value.

    The SMALL() results are not correct.

    The LARGE results are correct but I don't think would always be the case. Because, as far as I can tell, these formulas do not take into account grouping defined by H column.

    Correction, I do have COUNTIFS available (still not MINIF, MINIFS, MAXIF, MAXIFS). Just not sure it can be helpful.

    This does work.

    On each row K9:K70, calculate: =COUNTIF($J$9:$J$70,J9)

    Then 4 array formulas:

    {=MIN(IF($H$9:$H$70=1,$K$9:$K$70))}
    {=MAX(IF($H$9:$H$70=1,$K$9:$K$70))}
    {=MIN(IF($H$9:$H$70=2,$K$9:$K$70))}
    {=MAX(IF($H$9:$H$70=2,$K$9:$K$70))}

    Simpler than I expected. You probably have MINIF and MAXIF available.
    Last edited by June7; 05-27-2023 at 09:14 PM.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •