# Concatenate several columns into one in Google Sheets I want to concatenate/combine columns A, B and C into column D as displayed.

The number of filled entries in A, B and C will vary over time, so absolute cell addresses cannot be used.

What formula could I put into D1 to fill the column as illustrated?

• I'm aware that "append" may have been better vocabulary than "concatenate." Since concatenate is something you usually do with individual values. – Paulb Mar 6 '16 at 17:31
• Maybe best answer to merge for statistical manipulation here where you do not need to filtering here webapps.stackexchange.com/a/69049/66725 So just use `= {A1:A; B1:B}`. Etc to count unique matches in two columns `= count(unique(A1:A; B1:B}))`. – Léo Léopold Hertz 준영 Nov 10 '16 at 20:42

You need to filter down to non-empty cells, and then stack the results together:

``````={filter(A:A, len(A:A)); filter(B:B, len(B:B)); filter(C:C, len(C:C))}
``````

This is the same as this answer by grayob which is unfortunately buried under outdated answers.

• Worked perfectly. I saw that Q and I focused on the vmerge, unsuccessfully. In that Q, grayob's answer is better than the accepted answer. Tks. – Paulb Mar 6 '16 at 17:24

A shorter version of the formula in this other answer

``````=FILTER({A:A;B:B;C:C}, LEN({A:A;B:B;C:C}))
``````

A little longer, but can be constrained to a limited array (not whole columns):

``````=transpose(split(textjoin("|",1,{A1:C4}),"|"))
``````

where the order does not matter. Where it does:

``````=transpose(split(textjoin("|",1,{A1:A4;B1:B4;C1:C4}),"|"))
``````
• This is my favourite solution for this problem, it doesn't require naming all the columns. You can also do SORT for the first solution where you want it to be alphabetised. – Lou Jan 25 at 11:37