In my table, column A has row names and other columns have values:
+------+---+ | M100 | D | | M130 | B | | M340 | | | P304 | F | | P400 | | | P499 | C | +------+---+
I'd like to join nonempty values, preceding them with row names and separating by commas. So, the desired output is:
This is somewhat similar to Concatenating only filled cells except I also have row names.
query function allowed concatenation of string values, a solution could be something like
select concat(A,B) where B!='', subsequently joined. At present this is not supported, however.
I post my solution as an answer, but I'd like to see other approaches, as the double-filter formula looks a bit repetitive.