Thanks:  0
Likes:  0

# Thread: Problem with Average (I think)

1. I want to find the Average of cells F45 to Y45. But the last 5 cells (U45:Y45) do not have values in them yet. What do I need in the formula to ignore any cells that do not have a value, until they have a value. (number) in them?

2. Hi
As far as I know, the Average function ignores blanks...
Tom

3. On 2002-04-23 02:07, Phylis Sophical wrote:
I want to find the Average of cells F45 to Y45. But the last 5 cells (U45:Y45) do not have values in them yet. What do I need in the formula to ignore any cells that do not have a value, until they have a value. (number) in them?
You don't need anything other than AVERAGE() if it's JUST blanks or formula generated blanks.

I personally prefer to omit any error in this area by using something like

=SUM(F45:Y45)/COUNTIF(F45:Y45,">"&0).

then I have a clear understanding of the formula rather than just exepting something working because that's what its ment to do.

4. On 2002-04-23 02:34, Ian Mac wrote:
On 2002-04-23 02:07, Phylis Sophical wrote:
I want to find the Average of cells F45 to Y45. But the last 5 cells (U45:Y45) do not have values in them yet. What do I need in the formula to ignore any cells that do not have a value, until they have a value. (number) in them?
You don't need anything other than AVERAGE() if it's JUST blanks or formula generated blanks.

I personally prefer to omit any error in this area by using something like

=SUM(F45:Y45)/COUNTIF(F45:Y45,">"&0).

then I have a clear understanding of the formula rather than just exepting something working because that's what its ment to do.
Ian,

That formula excludes true zeroes and negative numbers!

5. Yes that was the problem Ian. Those are formula generated blanks. (I guess)In this case, I don't have to worry about negative numbers nor should it ever be zero. There is either a number above zero, or nothing because the formula in that cell says not to put anything in there if no number has been put in the cell that connects to the formula. Sorry I don't know the exact terminology but I'm sure you can all use a good chuckle today.

Can I ask what the & sign does?

6. On 2002-04-23 03:30, Phylis Sophical wrote:
Yes that was the problem Ian. Those are formula generated blanks. (I guess)In this case, I don't have to worry about negative numbers nor should it ever be zero. There is either a number above zero, or nothing because the formula in that cell says not to put anything in there if no number has been put in the cell that connects to the formula. Sorry I don't know the exact terminology but I'm sure you can all use a good chuckle today.

Can I ask what the & sign does?
AVERAGE ignores formula-generated blanks.

Start a clean worksheet.

In A1 enter: =IF(B1,1,"")

In A2 enter: 4

In A3 enter: 3

In A4 enter:

=AVERAGE(A1:A3)

=AVERAGE(A1,A2:A3)

What do you get?

BTW, & is a concatenation operator; In the formula Ian suggested, it creates ">0" when evaluated. & is needed to build up the condition argument in COUNTIF and SUMIF using cell references.

## User Tag List

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•