Problem with Average (I think)

Phylis Sophical

New Member
Joined
Jan 13, 2002
Messages
42
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?
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
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.
 
Upvote 0
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!

Aladin
 
Upvote 0
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?
 
Upvote 0
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.

Aladin
 
Upvote 0

Forum statistics

Threads
1,213,530
Messages
6,114,162
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top