Results 1 to 17 of 17

Need Help Optimizing an Array Formula (Simplified and Updated)

Threaded View

  1. #1
    Forum Contributor
    Join Date
    10-05-2010
    Location
    CA
    MS-Off Ver
    Excel 365
    Posts
    539

    Question Need Help Optimizing an Array Formula (Simplified and Updated)

    PLEASE SEE POST #13 FOR AN UPDATED VERSION OF MY QUESTION

    Hello,
    I recently had help creating the formula below at this very forum. I was very fortunate to find someone to help me code an array with so many parts but due to the amount of data I wish to evaluate the formula can take up to 45 minutes to an hour to calculate. I’m hoping that someone can take a look at the array and improve upon it and hopefully make it calculate much faster.

    The rules of the formula and the formula it’s self can be found below.

    =IF(COUNTIFS($S$3:$S$26,$S3,$T$3:$T$26,$T3,$U$3:$U$26,"Win"),IFERROR(INDEX($J$2:$R$2,SMALL(IF(MMULT(TRANSPOSE(ROW($T$3:$T$26)^0),IF($S$3:$S$26=$S3,IF($T$3:$T$26=$T3,IF($U$3:$U$26="Win",$J$3:$R$26+0,1-($U3<>"Win")*($J3:$R3)),1),1))=ROWS($T$3:$T$26),COLUMN($J3:$R3)-COLUMN($J3)+1),COLUMNS($V3:V3))),""),IF(LEFT(V$2,3)="1st",$S3,IF(LEFT(V$2,3)="2nd",$T3,"")))
    RULES
    Step 1: Match the values of rows Number Combos #1 and #2 columns “J” and “K”.

    Example:
    The formula would find all rows that contain the same value for column “J” [11111] and that contain the same value for column “K” [222].

    Step 2: The formula would then determine if there are Win, Loss, or Break Even in column “L” for each matching value, if there are any, found between columns “J” and “K”.

    Step 3: After all matches were found and the formula determined if there were Win, Loss, and/or Break Even present if so the following rules would be applied for the different variations:

    If 1 Win (only) =
    All TRUE Values from columns [M to U] would be the result in columns [V to AD] in order of appearance.

    If 2+ Win (only) =
    All of the rows between them that had TRUE values in the same column for each Win from columns [M to U] would be the result in columns [V to AD] in order of appearance.

    If 1+ Loss (only) (AND/OR) 1+ Break Even (only) =
    Column “J” Number Combo #1 would be the result for [column V] (1st Instance)/Column “K” Number Combo #2 would be the result for the [column W] (2nd Instance)

    If Mix Between 1 Win (only) (AND) 1+ Loss (only) (AND/OR) 1+ Break Even (only) =
    1 Win (only): All TRUE Values from columns [M to U] would be the result in columns [V to AD] in order of appearance. (AND)
    1+ Loss/1+ Break Even: Would list in order of appearance the instances were Win was TRUE and Loss or Break Even were FALSE

    If Mix Between 2+ Win (only) (AND) 1+ Loss (only) (AND/OR) 1+ Break Even (only) =
    2+ Win (only): All of the rows between them that had TRUE values in the same column for each Win from columns [M to U] would be the result in columns [V to AD] in order of appearance.
    (AND)
    1+ Loss/1+ Break Even: Would list in order of appearance the instances were ALL 2+ Win were TRUE and Loss or Break Even were FALSE

    More Information
    L17 contains the Win and L11 and L15 contain the Losses and I need the formula to find ALL of the cells where the Losses are False but the Wins are True.

    So in other words both Losses don't have to be False in order for them to be listed as a result but all of the Wins have to be the same in order for the Losses to apply but the rule isn't the same for the Wins.

    So even though the N11 Loss is True the result for the N15 Loss should still be listed because it's False and different from the N17 True. That's why the first instance for V15 should be "B".


    I have attached spreadsheet for a better understanding.


    Thank you in advance for any and all help provided.
    Attached Files Attached Files
    Last edited by artiststevens; 04-06-2014 at 01:53 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Optimizing formula for counting average from all cells in column.
    By teh.format in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-24-2014, 01:09 PM
  2. Optimizing excel formula
    By a.hudrea in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 01-31-2014, 02:31 AM
  3. Optimizing my formula
    By Lurr in forum Excel General
    Replies: 7
    Last Post: 06-21-2011, 03:32 PM
  4. Optimizing formula?
    By jkenney111 in forum Excel General
    Replies: 5
    Last Post: 12-20-2006, 06:44 PM
  5. [SOLVED] Tricky array formula issue - Using array formula on one cell, then autofilling down a range
    By aspenbordr in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-27-2005, 11:05 AM

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