Forum Discussion

Kyle_P19's avatar
Kyle_P19
Copper Contributor
Aug 21, 2022
Solved

Rather Complicated Array Analysis

Hello, I would like to take the names listed in a column range, and search for them by row, in a separate array area. For every row that included every name in the list, I would like to average a n...
  • Patrick2788's avatar
    Patrick2788
    Aug 22, 2022

    Kyle_P19 

    This will do it.

     

    First, we pair down the study group to eliminate blanks:

    =DROP(study,-COUNTBLANK(study))

     Next, determine which rows have all matches.  XMATCH is run against the row where unique values are found so a name appearing twice won't cause a false positive.

    =LET(b,BYROW(tests,LAMBDA(row,(IF(COUNT(XMATCH(sg,UNIQUE(row,1)))=ROWS(sg),ROW(row)-11,"")))),FILTER(b,b<>""))

    Fold it into a small formula:

    =AVERAGE(CHOOSEROWS(means,PickRows))

Resources