google spreadsheet: join arrays using function NOT CODE

后端 未结 7 1334
我寻月下人不归
我寻月下人不归 2021-02-05 03:52

I have one array

1 
2
3

another array

4
5
6

How do I use one function to join the 2 arrays?

         


        
7条回答
  •  孤城傲影
    2021-02-05 03:59

    TRANSPOSE() //takes matrix as argument and returns transposed matrix
    SPLIT() //breaks apart a string based on a delimiter character (char(13) here)
    ARRAYFORMULA() //applies the formula within to array vs cell
    CONCATENATE() //joins each cell in each range with a char(13), then the next cell...then the next matrix of cells (to which the first process also happens)
    //note char(13) is a carriage return, i will call CR for ease
    

    so if you have matrix A : 1, 2, 3 and matrix B : 4, 5, 6

    the steps would look like this:

    TRANSPOSE(SPLIT(ARRAYFORMULA(CONCATENATE("1CR2CR3CR" ; "4CR5CR6CR")), CR))
    TRANSPOSE(SPLIT("1CR2CR3CR4CR5CR6CR", "CR"))
    TRANSPOSE({"1","2","3","4","5","6"})
    

    finally:

    1
    2
    3
    4
    5
    6
    

提交回复
热议问题