ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Having trouble with AVG Function (https://www.excelbanter.com/excel-worksheet-functions/105504-having-trouble-avg-function.html)

[email protected]

Having trouble with AVG Function
 
Hi, sorry for noob question, but I cannot seem to make this work.

each line of my worksheet can contain from 1 to 6 entries
I want to average those but I don't know how to "turn off" the columns
that are null & therefore I get DIV/0 error.

EG:

A1 = 10, A2 = 10, A3 = 10, A4 = 10, A5 = 10, A6 = 10
B1 = 10, B2 = 10, B3 = 10
C1 = 10, C2 = 10, C3 = 10, C4 = 10

In all 3 examples, the Average is 10 (across the line, not down the
column)
I tried Nesting IF functions, eg: IF(A6=0, AVG(A1:A5), IF(A5=0,
AVG(A1:A4)) & so on

Can someone please help me figure out a formula that will average the
line items & ignore the blank cells

thanks a ton,

Kart


Dav

Having trouble with AVG Function
 

Average does ignore the blank items, the problem is that if all the
items are blank you will get #div/0!

if your formula is if(iserror(average(a1:a5)),""average(a1:a5)) thaty
should turn all the div/0 to blank

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=572538


[email protected]

Having trouble with AVG Function
 
Dav you are the bomb, thanks a ton, worked like a champ

Dav wrote:
Average does ignore the blank items, the problem is that if all the
items are blank you will get #div/0!

if your formula is if(iserror(average(a1:a5)),""average(a1:a5)) thaty
should turn all the div/0 to blank

Regards

Dav


--
Dav
------------------------------------------------------------------------
Dav's Profile: http://www.excelforum.com/member.php...o&userid=27107
View this thread: http://www.excelforum.com/showthread...hreadid=572538




All times are GMT +1. The time now is 02:12 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com