输入文字时,如何在Excel中创建自动合并URL?

时间:2018-09-20 06:48:32

标签: excel excel-formula hyperlink excel-online

URLs Sample
A:https://stackoverflow.com/questions/ask?a=""
B:https://stackoverflow.com/questions/ask?b=""
C:https://stackoverflow.com/questions/ask?c=""
     A             B            C
1 AA10002143    BBANZIEC    CC123415
2 AA21001234    BBCSKAUD    CC123556 
3 AA11231214    BBKLKFSH    CC134564

我需要一个结合单元格值和文本字符串的公式,该公式将完成HYPERLINK函数中的URL。我尝试了以下公式,但无效:

=HYPERLINK([https://stackoverflow.com/questions/ask?c="]Sheet1!C1&["],C1)

很高兴得到任何帮助。

1 个答案:

答案 0 :(得分:0)

尝试

=HYPERLINK("https://stackoverflow.com/questions/ask?c="&Sheet1!C1, Sheet1!C1)
'convert spaces in url to %20
=HYPERLINK("https://stackoverflow.com/questions/ask?c="&substitute(Sheet1!C1, " ", "%20"), Sheet1!C1)