Google-sheets – How to add blank rows after each item from a FILTER() or QUERY() result

google sheets

Suppose you have a spreadsheet similar to:

            A
1   "text a1"
2   "text a2"
3   "text a3"
4   "text a4" 

…and you'd like to create a new column containing each item followed by two blank rows, such as:

            A          B          C
1   "text a1"  "text a1" 
2   "text a2"
3   "text a3"
4   "text a4"  "text a2"
6
7
8              "text a3"
9
10
11             "text a4"
12
13

How can you do that?

Best Answer

After playing around a bit, I landed on the following:

  1. Appending each row with a string containing a delimiter with JOIN(), then
  2. Splitting them with SPLIT() and
  3. Converting the resulting array into a column with TRANSPOSE()

Like this:

=TRANSPOSE(SPLIT(ArrayFormula(JOIN(" , , ,",FILTER(A:A, A:A <> ""))),","))