I'm pretty sure that this is possible with a formula, but I don't know which way to take:
=ARRAYFORMULA()
, =UNIQUE()
, =QUERY()
or =TRANSPOSE()
?
Something like: =QUERY({A4:B9;C4:D9},"select * where Col1 is not null")
, but how can I produce column Category?
This is the scenario:
One could also use the following part for the category
TRANSPOSE(SPLIT(REPT("A,",COUNTA(A4:A11)),",",1,1))
CodePudding user response:
use:
=QUERY({QUERY(A4:B, "select 'A',A,B");
QUERY(C4:D, "select 'B',C,D")},
"where Col2 is not null", )