Reputation: 860
I'm trying to create a list of results from a QUERY
where the result from column 1 acts as a "title" in column 1 and then the result from column 2 would be displayed on the following row, but still in the second column. And this would be the pattern for all results.
I've attempted using the OFFSET
function. I have also attempted OFFSET
within QUERY
but just can't seem to get what I'm looking for.
This is where I left off...
=ArrayFormula(SORT(IFERROR(VLOOKUP(F2:F,QUERY({J2:K},"SELECT Col1,Col2 WHERE Col1 matches '"&TEXTJOIN("|", 1, F2:F)&"'",0),{1,2},)),1,TRUE))
Ultimately, it would look like
Title
Description
Title 2
Description 2
Upvotes: 2
Views: 885
Reputation: 1
try:
=ARRAYFORMULA(SPLIT(TRANSPOSE(SPLIT(QUERY(TRANSPOSE(QUERY(TRANSPOSE(IFNA(
VLOOKUP(SORT(F2:F), {J2:K4, "♦"&J2:J4, "♦♣ ♣"&K2:K4}, {3, 4}, 0)))
,,99^99)),,99^99), "♦")), "♣"))
Upvotes: 3