Average the sum of rows without a creating new column in Excel

前端 未结 2 1985
忘掉有多难
忘掉有多难 2021-01-24 17:17

Here\'s a sample of my matrix:

A   B   C   D   E
1   0   0   1   1
0   0   0   0   0

0   0   1   1   0
0   2           1

You can think of eac

2条回答
  •  走了就别回头了
    2021-01-24 18:07

    Basically, what you're describing here for your desired result is the =AVERAGEA() function

    The Microsoft Excel AVERAGEA function returns the average (arithmetic mean) of the numbers provided. The AVERAGEA function is different from the AVERAGE function in that it treats TRUE as a value of 1 and FALSE as a value of 0.

    With that in mind, the formula should look like this.

    =SUM(AVERAGEA(A1:A4),AVERAGEA(B1:B4),AVERAGE(C1:C4),AVERAGEA(D1:D4),AVERAGEA(E1:E4))
    

    Produces the expected result:


    Note, if you want to ROUND() the result to two digits, add the following formula to it:

    =ROUND(SUM(AVERAGEA(A1:A4),AVERAGEA(B1:B4),AVERAGE(C1:C4),AVERAGEA(D1:D4),AVERAGEA(E1:E4)), 2)
    

提交回复
热议问题