Search code examples
excelrow

excel/google sheet - combining 2 column into 1 (vertically)


what is the formula to combine 2 column into 1?

(sheet link included : here)

for example :

Column A Column B
Cell 1 Cell 2
Cell 3
Cell 4 Cell 5
Cell 6

become :

Combined (with the spacing blanks included)
Cell 1
Cell 3
Cell 4
Cell 6
Cell 2
Cell 5

this is the database primary sheet, so the plan is i will load/link from this database sheet to another sheet (plus in case i have another cell to add between, it will sorted out automatically)

i try arrayformula({A:A;B:B}) but it tells me to add another row ?

help please

formula tried :

  • arrayformula,

  • flatten, (it tells me to add another row?)

  • unique (it overwrite the doubles? and remove blank space?, i need the text to be it as it is)


Solution

  • Try the following formula for raw materials. Then use same formula for packaging and change column references.

    ={FILTER(A:A,A:A<>"");" ";FILTER(E:E,E:E<>"")}
    

    Edit: To include blank cells try this formula-

    ={C1:INDEX(C1:C,MATCH("zzz",C1:C));" "; G1:INDEX(G1:G,MATCH("zzz",G1:G))}