指向超链接字符串的多个链接(使用 ArrayFormula 拆分和连接)
Multiple links to hyperlink string (Split and concatenate with ArrayFormula)
我想弄清楚如何制作一个公式,将一个单元格中的 links 转换为另一个单元格中的 hyperlinks
从单元格 A1、A2 等我尝试使用拆分和连接公式获取单元格 B1、B2 等。但是不可能将每个 link 处理成一个“包装器”,然后将其包装回一个单元格中
A1
https://link.com/xxxxxx1, https://link.com/xxxxxx2, https://link.com/xxxxxx3
A2
https://link.com/xxxxxx1, https://link.com/xxxxxx2, https://link.com/xxxxxx3, https://link.com/xxxxxx4, https://link.com/xxxxxx5
B1
<a href="https://link.com/xxxxxx1">Button 1</a>, <a href="https://link.com/xxxxxx2">Button 2</a>, <a href="https://link.com/xxxxxx3">Button 3</a>
B2
<a href="https://link.com/xxxxxx1">Button 1</a>, <a href="https://link.com/xxxxxx2">Button 2</a>, <a href="https://link.com/xxxxxx3">Button 3</a>, <a href="https://link.com/xxxxxx3">Button 4</a>, <a href="https://link.com/xxxxxx3">Button 5</a>
https://docs.google.com/spreadsheets/d/1v8dYt6CIgwnlcc5HKJLNvuAcLZI0IKRTInsprs56hsU/edit?usp=sharing
尝试:
=INDEX(TEXTJOIN(", ", 1, "<a href="""&SPLIT(A1, ", ")&""">"&
"Name "&SEQUENCE(1, 3)&"</a>"))
数组公式:
=INDEX(REGEXREPLACE(TRIM(FLATTEN(QUERY(TRANSPOSE(IF(A1:A="",,
IF(IFERROR(SPLIT(A1:A, ", "))="",,"<a href="""&SPLIT(A1:A, ", ")&""">"&
"Button "&SEQUENCE(1, 5)&"</a>,"))),,9^8))), ",$", ))
我想弄清楚如何制作一个公式,将一个单元格中的 links 转换为另一个单元格中的 hyperlinks 从单元格 A1、A2 等我尝试使用拆分和连接公式获取单元格 B1、B2 等。但是不可能将每个 link 处理成一个“包装器”,然后将其包装回一个单元格中
A1
https://link.com/xxxxxx1, https://link.com/xxxxxx2, https://link.com/xxxxxx3
A2
https://link.com/xxxxxx1, https://link.com/xxxxxx2, https://link.com/xxxxxx3, https://link.com/xxxxxx4, https://link.com/xxxxxx5
B1
<a href="https://link.com/xxxxxx1">Button 1</a>, <a href="https://link.com/xxxxxx2">Button 2</a>, <a href="https://link.com/xxxxxx3">Button 3</a>
B2
<a href="https://link.com/xxxxxx1">Button 1</a>, <a href="https://link.com/xxxxxx2">Button 2</a>, <a href="https://link.com/xxxxxx3">Button 3</a>, <a href="https://link.com/xxxxxx3">Button 4</a>, <a href="https://link.com/xxxxxx3">Button 5</a>
https://docs.google.com/spreadsheets/d/1v8dYt6CIgwnlcc5HKJLNvuAcLZI0IKRTInsprs56hsU/edit?usp=sharing
尝试:
=INDEX(TEXTJOIN(", ", 1, "<a href="""&SPLIT(A1, ", ")&""">"&
"Name "&SEQUENCE(1, 3)&"</a>"))
数组公式:
=INDEX(REGEXREPLACE(TRIM(FLATTEN(QUERY(TRANSPOSE(IF(A1:A="",,
IF(IFERROR(SPLIT(A1:A, ", "))="",,"<a href="""&SPLIT(A1:A, ", ")&""">"&
"Button "&SEQUENCE(1, 5)&"</a>,"))),,9^8))), ",$", ))