Search code examples
google-sheets

Google Sheets Concatenating Cells in the Labels When it Should not


I cannot explain this behaviour. Here is a demo sheet:

https://docs.google.com/spreadsheets/d/14YQL_nD2L9B1vTh4BgEQHGAcEkaxinjKfSgmHNSwpz0/edit?usp=sharing

here is a function:

=query(A1:B3,"select *")

In a1:b3 I have some very simple data. All strings except one integer. The query function for some reason is concatenating data from each column at the top. If I change the integer to text, the problem resolves

demo query


Solution

  • =query(A1:B3,"select *",0)
    
    • set the third parameter [headers] to 0 to tell query there's no headers in that range; set as 1 to attribute first row as headers

    • as per query documentation: If omitted or set to -1, the value is guessed based on the content of data