Kenton Sparks
Kenton Sparks

Reputation: 145

Add "filler" column to Query in Google sheets

I would like to query a range A1:B3 with two columns, adding an initial third column with a character.

This is the data:

enter image description here

These are my query attempts:

=QUERY($A$1:$B$3,"SELECT '-', A, B")

=QUERY($A$1:$B$3,"SELECT '-', A, B",0)

This is the output

enter image description here

Would love a solution that looks like this:

enter image description here

Thanks for considering my query.

Kent

Upvotes: 1

Views: 151

Answers (1)

JPV
JPV

Reputation: 27262

Maybe add a second query where you use an offset ?

=QUERY(QUERY($A$1:$B$3,"SELECT '-', A, B",0), "offset 1")

enter image description here

Upvotes: 1

Related Questions