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.
Bookmarks