Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

依指定的次數重複顯示文字。使用 REPT 將文字字串新增多次。

語法

REPT(text,number_times)

文字     是您所要重複顯示的文字資料。

Number_times     是個正數,用以指定所要重複的次數。

註解

  • 如果 number_times 為 0,REPT 函數將傳回 " " (空字串)。

  • 如果 number_times 不是整數,則只取整數部分。

  • REPT 函數的結果不能長於 2000 個字元,否則 REPT 會傳回 #VALUE!。

範例

公式

說明 (結果)

=REPT("*-", 3)

顯示此字串三次 (*-*-*-)

=REPT("-",10)

顯示虛線 " - " 十次 (----------)

Need more help?

Want more options?

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

社群可協助您詢問並回答問題、提供意見反應,以及聆聽來自具有豐富知識的專家意見。

Was this information helpful?

How satisfied are you with the translation quality?
What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×