Calculating an AVERAGE formula

w8n4fri

New Member
Joined
Dec 5, 2005
Messages
14
Hello,
I need some assistance in regards to calculating an AVerage of a workshet where the results have to go onto a different worksheet. Here is the formula that I have tried using but does not work...

=AVERAGE(IF('CompanyA'!I7:I33<>0,I7:I33,""))

what i am doing is trying to calculate the average of column I row 7 -33 but if there is a "0" in the columns do not calculate that row..
Any help would be great..
 

Excel Facts

Remove leading & trailing spaces
Save as CSV to remove all leading and trailing spaces. It is faster than using TRIM().
RE-

Does that work even when taking the average from lets say page 5 and entering that total into page one. I have tried but receive a #VALUE error.
 
Upvote 0
Re: RE-

w8n4fri said:
Does that work even when taking the average from lets say page 5 and entering that total into page one. I have tried but receive a #VALUE error.

Do you have a formula generated #VALUE error in your range to average?
 
Upvote 0
=AVERAGE(IF('CompanyA'!I7:I33<>0,I7:I33,""))
I am trying calculate the average of column I7 - I33 , but only calculate the rows that have a number in them... ex..
I7 - I10 have numbers in them the rest are blank...depending on the month more or less rows will be populated.
 
Upvote 0
w8n4fri said:
=AVERAGE(IF('CompanyA'!I7:I33<>0,I7:I33,""))
I am trying calculate the average of column I7 - I33 , but only calculate the rows that have a number in them... ex..
I7 - I10 have numbers in them the rest are blank...depending on the month more or less rows will be populated.

You need to enter the following formula with CTRL+SHIFT+ENTER, see the Help files for array formulas and how to enter array formulas.

=AVERAGE(IF(I7:I33,I7:I33))

This will produce a #DIV/0! is the range is blank

Entered with just Enter,

=SUM(I7:I33)/MAX(1,COUNT(I7:I33)-COUNTIF(I7:I33,0))

This will return 0 if the range is blank.

Don't forget to use the sheet name, as I'm lazy and omitted the sheet names from the formula.
 
Upvote 0
Brian...
thank you for the formula..but I still cant get it to work..this is the formula with the company name put in...did i do it correctly/
=sum('Company'!I7:I33)/MAX(1,count('Company'!(I7:I33)-CountIF('Company'!I7:I33,0))
 
Upvote 0
w8n4fri said:
Brian...
thank you for the formula..but I still cant get it to work..this is the formula with the company name put in...did i do it correctly/
=sum('Company'!I7:I33)/MAX(1,count('Company'!(I7:I33)-CountIF('Company'!I7:I33,0))

What do you get as a result of the above formula?

=SUM('Company'I7:I33)/MAX(1,COUNT('Company'I7:I33)-COUNTIF('Company'I7:I33,0))

With this, entered with just Enter or

=AVERAGE(IF('Company'I7:I33,'Company'I7:I33))

entered by pressing CTRL+SHIFT+ENTER?
 
Upvote 0

Forum statistics

Threads
1,214,402
Messages
6,119,301
Members
448,885
Latest member
LokiSonic

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