I'm use the query function, and what I want is to combine columns A, B, and C into a string with hyphens separating them. i.e. "2-4-6".
A|B|C
-|-|-
2|4|6
How could I do this?
I've tried the following but it returns an error:
=query(raw!A1:C, "select 'A & '-' & B & '-' &C")
try:
=ARRAYFORMULA(SUBSTITUTE(TRIM(TRANSPOSE(QUERY(TRANSPOSE(raw!A1:C),,999^99))), " ", "-"))
or use:
=ARRAYFORMULA(raw!A:A&IF(raw!B:B="",,"-"&raw!B:B)&IF(raw!C:C="",,"-"&raw!C:C))