套用到
SharePoint Server 訂閱版本 SharePoint Server 2019 SharePoint Server 2016 SharePoint Server 2013 SharePoint Server 2013 企業版 Microsoft 365 中的 SharePoint SharePoint Foundation 2010 SharePoint Server 2010 Microsoft 365 小型企業版中的 SharePoint Windows SharePoint Services 3.0

依指定的次數重複文字。 使用 REPT 新增一些文字字串的實例。

語法

REPT (文字,number_times)

Text     是您要重複的文字。

Number_times     是指定重複文字之次數的正數。

備註

  • 如果 number_times 為 0 (零),則 REPT 會傳回 "" (空白文字)。

  • 如果 number_times 不是整數,則會取至整數。

  • REPT 函數的結果不能超過 2000 個字元,或 REPT 傳回 #VALUE!。

範例

公式

描述 (結果)

=REPT("*-", 3)

(*-*-*-) 顯示字串 3 次

=REPT("-",10)

顯示虛線 10 次 (----------)

需要更多協助嗎?

想要其他選項嗎?

探索訂閱權益、瀏覽訓練課程、瞭解如何保護您的裝置等等。