REPT

傳回將指定文字重複多次的結果。

使用範本

REPT("ha",4)

REPT(A2,3)

語法

REPT(text_to_repeat, number_of_repetitions)

  • 重複文字 要重複的字元或字串。

  • 重複次數 - The number of times 重複文字 should appear in the value returned.

    • The maximum number of repetitions is 100. IF 重複次數 is greater than 100, REPT will only repeat the text 100 times.

附註

  • REPT does not insert spaces between repetitions of 重複文字 . IFspaces are desired, a space must be appended to the end of the value of 重複文字 . The resulting return value from REPT will have at least one trailing space, which may be removed with TRIM.

另請參閱

TRIM: 移除文字開頭、結尾和重複的空格。

SUBSTITUTE: 以新文字取代字串中的現有文字。

SPLIT: 以指定字元或字串分隔文字,並將分隔後的區段放入同一列的不同儲存格。

範例

true
造訪學習中心

您有在公司或學校使用 Google 文件等 Google 產品嗎?快來試試實用的秘訣、教學課程和範本,瞭解如何在不安裝 Office 的情況下處理 Office 檔案、建立動態專案計劃和小組日曆、自動整理收件匣及進行其他作業。

搜尋
清除搜尋內容
關閉搜尋
主選單
8226133409961854762
true
搜尋說明中心
true
true
true
true
true
35
false
false