📑 Merge Two Columns Using QUERY: Google Sheets (Step By Step Example)

Bookmarked https://scripteverything.com/merge-two-columns-using-query-google-sheets/ (scripteverything.com)

So if we wanted to get all the elements within our column wrapped into one row we would just need to change that third parameter to the maximum height of our columns. We could use the

ROWS()

function to capture this number:

Merge Two Columns Using QUERY: Google Sheets (Step By Step Example) by Ryan Sheehy


I have a QUERY that I wanted to display in one column so that I could roll the results up into one cell to copy and paste elsewhere. I found this guide to combining columns and simply transposed the data to get the outcome I was after:

=JOIN(CHAR(10),TRANSPOSE(QUERY(TRANSPOSE({"","","","","","";"Record(s) updated / merged:","","","","","";"","","","","","";SORT(Indirect(Table1));"","","","","","";"Record(s) retained:","","","","","";"","","","","",""; SORT(Indirect(Table2))}),,ROWS(TRANSPOSE({"","","","","","";"Record(s) updated / merged:","","","","","";"","","","","","";SORT(Indirect(Table1));"","","","","","";"Record(s) retained:","","","","","";"","","","","",""; SORT(Indirect(Table2))})))))

Leave a Reply

Your email address will not be published. Required fields are marked *