I have a spreadsheet, where I keep the times I come in and leave at and from work. In the next column, I summarise those values in order to see the amount of time I spent at work, which gives me the amount of time I spent at work during a week.
Now I'd like to know what is the average time I spent at work during a week.
I'd thought I could achieve this using the AVERAGEIF
function, using ">0"
in order to skip blank entries, but this seems not to work:
E.g.
A B C D E F
1 Day Date In Out Diff Cumul
2 Monday 13/10/2014 8:15 16:30 7:30
3 Tuesday 14/10/2014 8:15 17:10 8:10
4 Wednesday 15/10/2014 8:05 17:10 8:20
5 Thursday 16/10/2014 8:25 17:10 8:00
6 Friday 17/10/2014 8:25 17:00 7:50
7 Saturday 18/10/2014 39:50
As you see, column E contains the difference between "In" and "Out" (taking into account the lunch break), column F contains the sum of the values of column E.
For calculating the average of the entries in column F, I've tried to use the function "AVERAGEIF", as follows:
=AVERAGEIF(F1:F7;">0") // I thought of ">0" for skipping blanks,
// and so only use cells which are filled in.
The result of this function however is 15:50 (no idea how to interpret this), afterwards I'd like to replace "F1:F7" by "F:F" for calculating the average of the whole sheet.
There are two solutions to my problem:
AVERAGEIF
formula only to use the cells F7, F14, F21, ... (is this even possible?)Does anybody know how to skip blanks in formulas?
Thanks
The answer has correctly been given by Fabian F, thanks a lot for that. The situation is the following:
I had forgotten that the cells in Column F had a special formatting [u]:mm
, causing 39:50
to be correctly shown as 39:50
, in normal cases this gets translated into 15:50
(you can't fit 39:50
hours in a day, hence 39:50-24:00=15:50
).
It seems that blanks are skipped automatically by the AVERAGE
function, so my request to skip blanks has no sense.
However, I'll keep using the formula as you can see in following template of next week:
A B C D E F
Monday 07/11/2016
Tuesday 08/11/2016
Wednesday 09/11/2016
Thursday 10/11/2016
Friday 11/11/2016
Saturday 12/11/2016 0:00
As you see, column F contains sums (of empty values), hence this contains a zero value. By using the AVERAGEIF
function with condition ">0"
, I can skip the templates of the weeks which are not filled in yet.