I have done a QUERY from an importxml in Google Sheets, and I'm getting results in several columns. I need to get these results in only one column, but I always need to keep the first cell of each row even if it's blank. If that's the case, I don't want to keep blanks for other cells in the same row.
My data looks like this:
empty row
empty row
1x 1x 1x
1x 1x 1x
empty row
empty row
1x 1x 1x
1x 1x 1x
empty row
5x
And I want to get:
empty cell
empty cell
1x
1x
1x
1x
1x
1x
empty cell
empty cell
5x
My current code is this:
=QUERY(importxml('url-address';"//ul[@class='xxxxxxx']");"SELECT * WHERE Col1 CONTAINS 'x' OR Col1 IS NULL";-1)
EDIT: This is the link to the actual spreadsheet: https://docs.google.com/spreadsheets/d/1ZownNdUfFEeBmZ4hEQwkDVu-phYzU-2nCAH2Fg91GRs/edit?usp=sharing
I'm using to retrieve information for a videogame. I had already done it, but something has changed in the website I get the information from, and therefore now I need to adapt my formulae.
In tab "Gear components" you can find the structure of the data as it was with my previous formulae. In tab 'Formulas', you can find what I'm getting now. The list of gear on the left, and the amount of each one on the right, but with an inappropriate structure. Therefore, I need to keep all 1x and 5x.
1x
s in your output table? – TheMaster-1
on the end could cause funny results, If your input data includes a header row, try1
instead. Providing a sample sheet, with sample data, would let us help you. – kirkg131x
next to it, the output should repeat this value in three different rows, one with a1x
next to it? Something like this. – Iamblichus