キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

how to calculate the sum of the values of some columns of a table

解決済み
解決策を見る
0 件の賞賛
メッセージ21/23
855件の閲覧回数
解決策
受理者 achfire

I'm willing to bet that you put something in the third row.  Even if it was deleted, there will be an empty string.  And since arrays must be rectangular, if you added to row 2 anything, all of the colums will have something in there.  They will default to an empty string.  And when you convert an empty string to a number, you get 0 (whatever you specify as the default).  So the added 0s throw off your average.

 

So put in some code to filter out the empty strings to that they don't affect your average.



There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
メッセージ22/23
848件の閲覧回数

really thanks a lot P@Anand and for your precious help 😉

0 件の賞賛
メッセージ23/23
837件の閲覧回数