I need help with and average formula

Hey_Edrey

New Member
Joined
Sep 19, 2006
Messages
2
I'm trying to see if there is a way to get an average of three cells but in some cases one or two of the 3 cells will be zero and I want it to average accordingly to the amount of cells with a value in them for example:


150 , 154 , 140 = 148 this gets divided by 3 values entered


150 , 154 , 0 = 101 this gets divided by 3 values but there are only two entered, I need it to divide by 2 only

150 , 0 , 0 = 50 should be 150 if divided by only 1 value entered


If anybody can understand what I just wrote please help me
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
Welcome to the Board!

How's this:

=SUM(A3:C3)/COUNTIF(A3:C3,">0")

What if you get negative numbers?

Hope that helps,

Smitty
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,246
Members
449,075
Latest member
staticfluids

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