如何在 Google 表格中将文本或符号更改为换行符?

How to change a text or symbol into line break in Google Sheets?

我正在尝试将 Google 表格中的所有 ; 更改为换行符 \n

有没有办法自动执行此操作,或者我需要一项一项地完成?

使用 SUBSTITUTEREGEXREPLACE 包裹在 ARRAYFORMULA 中的公式,例如:

=ARRAYFORMULA(SUBSTITUTE(your_formula_or_range_here, ";", CHAR(10))

=ARRAYFORMULA(REGEXREPLACE(your_formula_or_range_here, ";", CHAR(10))

示例:

=ARRAYFORMULA(SUBSTITUTE(QUERY({INDEX(QUERY(A1:B, 
 "select A,count(A) where A is not null group by A pivot B", 0), , 1), 
 REGEXREPLACE(TRIM(TRANSPOSE(QUERY(TRANSPOSE(IF(ISNUMBER(QUERY(A1:B, 
 "select count(A) where A is not null group by A pivot B", 0)), INDEX(QUERY({A1:A,B1:B&";"},
 "select count(Col1) where Col1 is not null group by Col1 pivot Col2 offset 1", 0), 1,), ))
 , , 999^99))), ";$", )}, "offset 1", 0), "; ", CHAR(10)))