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

將指定自變數中的所有數位相加。

語法

SUM (number1,number2...)

Number1, number2, ...     這是要求獲得總值或總和的 1 到 30 個自變數。

備註

  • 會計算直接輸入引數清單之數值、邏輯值及數字的文字格式。 請參閱下列第一個和第二個範例。

  • 自變數會在錯誤值或文字無法轉換成數位時造成錯誤。

範例

Col1

Col2

Col3

Col4

Col5

公式

描述 (結果)

-5

15

30

TRUE

=SUM(3, 2)

加上 3 和 2 (5)

-5

15

30

TRUE

=SUM("5", 15, TRUE)

加總 5、15 和 1,因為文字值會轉換成數位,邏輯值 TRUE 會轉換成數位 1 (21)

-5

15

30

TRUE

=SUM ([Col1], [Col2], [Col3])

將欄的前三個數位加 (40)

-5

15

30

TRUE

=SUM ([Col1], [Col2], [Col3], 15)

將欄的前三個數位相加,15 (55)

-5

15

30

TRUE

=SUM ([Col4], [Col5], 2)

將最後兩欄的值相加,2 (3)

Need more help?

Want more options?

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