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
 

Some videos you may like

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).

Smitty

Legend
Joined
May 15, 2003
Messages
29,536
Welcome to the Board!

How's this:

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

What if you get negative numbers?

Hope that helps,

Smitty
 

Watch MrExcel Video

Forum statistics

Threads
1,114,406
Messages
5,547,759
Members
410,811
Latest member
adustin42
Top