Created
March 17, 2022 17:38
-
-
Save andrewcharlesmoss/914f7830bcc523d799035032b72b0635 to your computer and use it in GitHub Desktop.
FLATTEN function to flatten all the values from one or more ranges into a single column
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FLATTEN = | |
LAMBDA(array, | |
LET( | |
rows,ROWS(array), | |
columns,COLUMNS(array), | |
sequence,SEQUENCE(rows*columns), | |
quotient,QUOTIENT(sequence-1,columns)+1, | |
mod,MOD(sequence-1,columns)+1, | |
INDEX(IF(array="","",array),quotient,mod) | |
) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment