View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Average Function (include Blank Cells and Zeros)

My bad, my formula is wrong.

A1:AD1 = number of calendar days (June1 to June30)
A2:AD2 = data (for example, no. of orders)
A3:AD3 = data
so on and so forth.


wrote:
Hi, I appreciate all the help.

I can't use =sum(b1:b30)/count(a1:a30).

It seems that the count function does not include or consider blank
spaces in its calculation. As mentioned, weekends are left blank on my
worksheet. I need to divide by the number of calendar days (as of
latest day of inputs encoded by each department). So for example, if
today is June 16 and marketing has updated their inputs as of June 16,
my divisor should be 16. On the other hand, operations has not yet
updated their inputs and their inputs is as of June 15, my divisor
should be 15.

As much as possible, I don't want to update the divisor everytime a
department refreshes their inputs. Is this possible?

Dominic LeVasseur wrote:
Candice,

The average function, as you know, won't include blank cells.

You could use something like:

=sum(b1:b10)/count(a1:a10)

Where your data is in column B and your dates are in column A

You would need to create a formula for each department range.

HTH


" wrote:

Hi, can someone help me?

My "final" worksheet is linked to another "input" worksheet. I wish for
my final worksheet to mirror exactly whatever is in the input
worksheet. For example, weekends/non-working days/holidays are "blank"
while weekdays/working days are filled with numbers (including zeros on
working days whenever there's no order). I've already accomplished this
part.

However, another dilemma arises when I have to average the daily
figures by the number of calendar days for all departments. Note that
all departments update their figures on different times. For example,
as of June 8, Operations dept may have already updated their figures as
of latest date (June8) while Marketing has only updated as of June 7.

Also, I don't want to update the daily average calculation (changing
the divisor depending upon the latest no. of calendar days) everytime a
department updates their figures. Is it possible to just have a
standard average formula for all departments?

My "final" worksheet as of June 8,
Operations Dept (sum divided by 8 working days)
June1(Mon) = 34
June2(Tue) = 31
June3(Wed) = 0
June4(Thur) = 23
June5(Fri) = 21
June6(Sat) = " "
June7(Sun) = " "
June8(Mon) = 23
June 9 onwards is still blank.

Marketing Dept (sum divided by 7 working days)
June1(Mon) = 34
June2(Tue) = 31
June3(Wed) = 0
June4(Thur) = 23
June5(Fri) = 21
June6(Sat) = " "
June7(Sun) = " "
June8 onwards is still blank.

Is there a solution to my problem? Thanks in advance for the help! =)