将一列添加到字符串以在下一列中动态创建URL


9

我有一个要转换成链接的产品ID代码电子表格,从我读过的所有内容来看,Google表格中的concat或concatenate函数应该适用于此功能,但是到目前为止,我尝试的所有操作均会导致错误。

我想得到什么:

Brand   Product Code    URL 
AP      X527W           http://example.com/search.php?Code=X527W    
AP      X522M           http://example.com/search.php?Code=X527W
AP      Y500M           http://example.com/search.php?Code=X527W        

当我使用公式时,实际上会发生什么:

=concat('http://example.com/search.php?Code=', B2)

要么 =concatenate('http://example.com/search.php?Code=', B2)

要么 ='http://example.com/search.php?Code=' & B2

#Error

那么,如何在Google表格中串联字符串?

Answers:


22

始终将字符串文字用双引号引起来。

= "http://example.com/search.php?Code=" & B2

4

这对我来说很好:

=concatenate("http://example.com/search.php?Code="; B2)
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.