I am trying to edit this:

=filter( G27:H60, M27:M60

= max( filter( M27:M60, regexmatch(I27:I60, "(?i)^(CADET|C/Amn|C/A1C|C/SrA)$") ) ) )

So that it works across multiple columns/ranges. This is what I tried to do -

=filter({G27:H60,C17:D19,G8:H11,K17:L20}, {M27:M60,I17:I19,M8:M11,Q17:Q20} = max( filter( {M27:M60,I17:I19,M8:M11,Q17:Q20}, regexmatch({I27:I60,E17:E19,I8:I11,M17:M20}, "(?i)^(CADET|C/Amn|C/A1C|C/SrA)$") ) ) )

  • But I get the error, "Function ARRAY_ROW parameter 2 has mismatched row size. Expected: 34. Actual: 3."

Here's the table: enter image description here

Essentially I just want it to go through each table, find the maximum points of only the names that have at least CADET, C/Amn, C/A1C, or C/SrA as the rank, then return the name that that row corresponds to.

1 Answer 1


When you join ranges with an { array expression }, the ranges must be of the same height (when joining horizontally) or the same width (when joining vertically).

You apparently want to join ranges vertically, so the array expression must use the vertical separator ; instead of the horizontal separator , like this:

  { G27:H60; C17:D19; G8:H11; K17:L20 }; 
  { M27:M60; I17:I19; M8:M11; Q17:Q20 } 
      { M27:M60; I17:I19; M8:M11; Q17:Q20 }; 
      regexmatch( { I27:I60; E17:E19; I8:I11; M17:M20 }; "(?i)^(CADET|C/Amn|C/A1C|C/SrA)$" ) 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.