看板 Office 關於我們 聯絡資訊
軟體:EXCEL 版本:2010 自訂一個函數 Function CountStr(範圍, 字串) For Each cell In 範圍 過渡 = (Len(cell) - Len(Application.Substitute(cell, 字串, ""))) / Len(字串) CountStr = CountStr + 過渡 Next End Function 這個函數目的是要回傳儲存格內有幾個指定的字串 原本使用好好的 最近發現 當儲存格的字元 >=256 時 函數會錯誤 請問我該在哪邊做什麼宣告 來解決這個問題呢 謝謝 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 223.136.131.134 (臺灣) ※ 文章網址: https://www.ptt.cc/bbs/Office/M.1585814139.A.9F9.html
soyoso: aplication.substitute(..)改為replace(...) 04/02 16:03
home0303: 驚 謝謝S大 04/02 16:39