我想要一個搜索字符串的所有匹配項http
並刪除整個鏈接的公式。例如:刪除以某些字符開頭的整個單詞的公式
This is the best story ever http://www.usatoday.com make sure to read it twice. http://www.usatoday.com/image.jpg
將成爲:
This is the best story ever make sure to read it twice.
從我讀過,這應該這樣做:
=TRIM(LEFT(A1,FIND("http",A1)-1))&RIGHT(A1,LEN(A1)-FIND(" ",A1,FIND("http",A1))+1)
,但我仍然得到#VALUE!
。
我希望能夠讓代碼在字符串中的任意位置找到URL。另外,如果找不到網址,我只想重印原始字符串。
任何想法?
如果您只想涵蓋句子結尾的可能性,那麼您公式的縮寫版應該足夠了:'= LEFT(A1,FIND(「http」,A1)-2)' – pnuts
+ 1好問題。幾乎讓我感到困惑:) –