With Excel 365 and data in columns A and B, in C1 enter:
=FILTERXML("<a><b>"&SUBSTITUTE(TEXTJOIN(",",TRUE,A1:B16),",","</b><b>")&"</b></a>","//b")
EDIT#1:
If we want to include data from columns A and E, but exclude columns B, C, and D, then replace:
SUBSTITUTE(TEXTJOIN(",",TRUE,A1:B16)
with something like:
TEXTJOIN(",",TRUE,A:A,E:E)
EDIT#2:
Here is the correct equation:
=LET(x,INDEX(A$2:E$22,ROUNDUP(SEQUENCE(42)/2,0),IF(MOD(SEQUENCE(42),2)=0,5,1)),FILTER(x,x<>""))
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…