ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   calculating average with blank cells (https://www.excelbanter.com/excel-worksheet-functions/103555-calculating-average-blank-cells.html)

marvinks

calculating average with blank cells
 

Hi
I have 4 columns with an average function on the bottom, however not
all the columns are used all the time, resulting in an error (#DIV/0!).
How do I calculate the average only if the cells are used. If I don't
used one of the columns I would like it to stay blank or return 0
thanks
marvin


--
marvinks
------------------------------------------------------------------------
marvinks's Profile: http://www.excelforum.com/member.php...o&userid=37188
View this thread: http://www.excelforum.com/showthread...hreadid=568964


starguy

calculating average with blank cells
 

enter following formula at the bottom of your columns instead of simple
AVERAGE function.
suppose your data is in col A range(A1:A50), you should change this
range for each column.

=IF(ISERROR(AVERAGE(A1:A50)),"",AVERAGE(A1:A50))

marvinks Wrote:
Hi
I have 4 columns with an average function on the bottom, however not
all the columns are used all the time, resulting in an error (#DIV/0!).
How do I calculate the average only if the cells are used. If I don't
used one of the columns I would like it to stay blank or return 0
thanks
marvin



--
starguy
------------------------------------------------------------------------
starguy's Profile: http://www.excelforum.com/member.php...o&userid=32434
View this thread: http://www.excelforum.com/showthread...hreadid=568964


Scoops

calculating average with blank cells
 

marvinks wrote:
Hi
I have 4 columns with an average function on the bottom, however not
all the columns are used all the time, resulting in an error (#DIV/0!).
How do I calculate the average only if the cells are used. If I don't
used one of the columns I would like it to stay blank or return 0
thanks
marvin


--
marvinks


Hi marvinks

Try:

=IF(ISERR(AVERAGE(A1:A4)),0,AVERAGE(A1:A4))

Adjust ranges as necessary.

Regards

Steve


marvinks

calculating average with blank cells
 

thanks everyone, I'm off to the races

Marvin


--
marvinks
------------------------------------------------------------------------
marvinks's Profile: http://www.excelforum.com/member.php...o&userid=37188
View this thread: http://www.excelforum.com/showthread...hreadid=568964



All times are GMT +1. The time now is 05:18 PM.

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