Average function does not work

3

Hello, I created several random numbers with ALEATÓRIOENTRE() and concatenated them with CONCAT() I copied those values and pasted them in another part of the spreadsheet. I was trying to make the media with MÉDIA() But it returns me to no value, only when I select the values and give enter that it starts reading that value. How to fix this? Thank you.

Here'sthelinktoviewtheworksheetinexcelonline: link

    
asked by anonymous 27.07.2016 / 00:14

1 answer

4

Your problem is that you are manipulating hours as text strings (since you are using the concat function to "join" hour and minutes). Since it does not make sense to calculate the average of text (the média function necessarily expects numeric values), it generates error.

What you should have done is the numeric time format used. Excel treats hours as 24-hour decimal values (that is, 00:00:00 is 0,0 , 12:00:00 is 0,5 , 24:00:00 is 1,0 , 48:00:00 is 2,0 , and so on). Therefore, you can do the "join" without using the concat function with the following formula (exemplified for the calculation of the first column):

=(G8+(G9/60))/24

This formula numerically sums the value of the time (column G8) with the minutes in decimal (that is, column G9 divided by 60, to give the fraction of time), and there divides everything by 24 to calculate the value of the hour decimal expected by Excel.

Note that the cell value where this formula will be placed will contain a number (not a text string!). For example, in the image below, cell G18, which displays 01:46 , actually contains 0,07 . Therefore, the value of this cell can be used to compute a mean normally.

  

Incidentally, if you use the [hh]:mm mask in cell formatting, you   can display hours above% with% (as 24 ), something that might be useful in displaying cumulative workload, for example.

The result is that the average works, as shown below:

    
27.07.2016 / 17:00