I have this formula which works well to combine column A and column B in a specific order:
=SUBSTITUTE(FILTERXML("<t><s>"&TEXTJOIN("</s><s>'",,CHOOSE({1,2},IF(E2:E67="-","",E2:E67),G2:G67))&"</s></t>","//s"),"'","")
This is a variation on: =FILTERXML("<a><b>"&SUBSTITUTE(TEXTJOIN(",",TRUE,A2:B22),",","</b><b>")&"</b></a>","//b")
.
The problem with the old formula is that is requires the columns where it pulls the values from to be adjacent. The new formula solves this but now unlike the original doesn't filter out blank cells and instead inserts 0.
Additionally I would like to be able to define a character e.g. "-" for the new formula to ignore.
"&TEXTJOIN("'",,CHOOSE({1,2},IF((E3:E61="")+(E3:E61="-"),"",E3:E61),IF((F3:F61="")+(F3:F61="-"),"",F3:F61)&""&TEXTJOIN("'",,CHOOSE({1,2},IF((E3:E61="")+(E3:E61="-"),"",E3:E61),IF((F3:F61="")+(F3:F61="-"),"",F3:F61)))&"