Google Sheets Query Returns All Rows in One Row

Viewed 29

I have a query formula setup to pull form data from another sheet in the same spreadsheet. For some reason, it is loading all the rows but in one row.

Went ahead and made a copy of my spreadsheet so the issue can be seen better

https://docs.google.com/spreadsheets/d/1iCIfdA7lg6DNzr6O-q7oLWeXCFgTxbrwBi4wYqR7hQw/edit?usp=sharing

How it should look is:

USD | Migros | 18.12

TRY | Kumru | 25

But is instead loading:

USD TRY | Migros Kumru | 18.12 25

I have another spreadsheet with an almost identical setup, but it loads the data in separate rows. Cannot figure out what is different here.

2 Answers

usually this happens when you skip 3rd query parameter. use:

=QUERY(DATA!A2:J4000, "SELECT F,H,G WHERE J = 'October' AND B = 'Groceries'", 0)

enter image description here

Instead of query you can use IMPORTRANGE(spreadsheet_url, range_string) function:

For example if you create a new sheet and copy this formula to A1, then you'll have the range from your current sheet in the new one:

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1iCIfdA7lg6DNzr6O-q7oLWeXCFgTxbrwBi4wYqR7hQw/edit#gid=294335694", "A:C")
Related