Applies To
SharePoint Server Subscription Edition SharePoint Server 2019 SharePoint Server 2016 SharePoint Server 2013 SharePoint Server 2013 Enterprise SharePoint in Microsoft 365 SharePoint Foundation 2010 SharePoint Server 2010 SharePoint in Microsoft 365 Small Business Windows SharePoint Services 3.0

LEFT 會傳回文字字串中的第一個字元或前幾個字元 (根據您指定的字元數而定)。

語法

(文字,num_chars)

Text     是包含您要擷取之字元的文字字串。

Num_chars     指定您要 LEFT 擷取的字元數。 Num_chars 必須大於或等於零。 如果 num_chars 大於 text 的長度,LEFT 會傳回所有文字。 如果省略 num_chars,則會假設其值為 1。

範例

Col1

Form ula

描述 (結果)

Sale Price

=LEFT ([Col1],4)

銷售 () 字串的前四個字元

瑞典

=LEFT ([Col1])

字串中的第一個字元 (S)

Need more help?

Want more options?

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