ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Whats wrong with this function? (https://www.excelbanter.com/excel-worksheet-functions/224497-whats-wrong-function.html)

Angelsnecropolis

Whats wrong with this function?
 
B45 =IF(AVERAGE(B34:D340), AVERAGE(B34:D34),"")

It works fine when there is a number in B34 but if B34 is blank, even though
C34 and D34 are not blank, B45 is still blank.

How can I fix this so a number in any of the 3 fields will produce a number
in B45?

Thanks ^_^

Rick Rothstein

Whats wrong with this function?
 
Give this a try...

=IF(COUNTA(B34:D34)0, AVERAGE(B34:D34),"")

--
Rick (MVP - Excel)


"Angelsnecropolis" wrote in
message ...
B45 =IF(AVERAGE(B34:D340), AVERAGE(B34:D34),"")

It works fine when there is a number in B34 but if B34 is blank, even
though
C34 and D34 are not blank, B45 is still blank.

How can I fix this so a number in any of the 3 fields will produce a
number
in B45?

Thanks ^_^



Bob Phillips[_3_]

Whats wrong with this function?
 
I think that you mean

=IF(COUNT(B34:D34)0, AVERAGE(B34:D34),"")

or even

=IF(COUNT(B34:D34), AVERAGE(B34:D34),"")



--
__________________________________
HTH

Bob

"Rick Rothstein" wrote in message
...
Give this a try...

=IF(COUNTA(B34:D34)0, AVERAGE(B34:D34),"")

--
Rick (MVP - Excel)


"Angelsnecropolis" wrote in
message ...
B45 =IF(AVERAGE(B34:D340), AVERAGE(B34:D34),"")

It works fine when there is a number in B34 but if B34 is blank, even
though
C34 and D34 are not blank, B45 is still blank.

How can I fix this so a number in any of the 3 fields will produce a
number
in B45?

Thanks ^_^





Angelsnecropolis

Whats wrong with this function?
 
Thanks for the help!

"Rick Rothstein" wrote:

Give this a try...

=IF(COUNTA(B34:D34)0, AVERAGE(B34:D34),"")

--
Rick (MVP - Excel)


"Angelsnecropolis" wrote in
message ...
B45 =IF(AVERAGE(B34:D340), AVERAGE(B34:D34),"")

It works fine when there is a number in B34 but if B34 is blank, even
though
C34 and D34 are not blank, B45 is still blank.

How can I fix this so a number in any of the 3 fields will produce a
number
in B45?

Thanks ^_^




Angelsnecropolis

Whats wrong with this function?
 
Thanks for the help. That worked.

"Bob Phillips" wrote:

I think that you mean

=IF(COUNT(B34:D34)0, AVERAGE(B34:D34),"")

or even

=IF(COUNT(B34:D34), AVERAGE(B34:D34),"")



--
__________________________________
HTH

Bob

"Rick Rothstein" wrote in message
...
Give this a try...

=IF(COUNTA(B34:D34)0, AVERAGE(B34:D34),"")

--
Rick (MVP - Excel)


"Angelsnecropolis" wrote in
message ...
B45 =IF(AVERAGE(B34:D340), AVERAGE(B34:D34),"")

It works fine when there is a number in B34 but if B34 is blank, even
though
C34 and D34 are not blank, B45 is still blank.

How can I fix this so a number in any of the 3 fields will produce a
number
in B45?

Thanks ^_^






Shane Devenshire

Whats wrong with this function?
 
Hi,

If you are using 2007 try this

=IFERROR(AVERAGE(B34:D34),"")


--
If this helps, please click the Yes button.

Cheers,
Shane Devenshire


"Angelsnecropolis" wrote:

B45 =IF(AVERAGE(B34:D340), AVERAGE(B34:D34),"")

It works fine when there is a number in B34 but if B34 is blank, even though
C34 and D34 are not blank, B45 is still blank.

How can I fix this so a number in any of the 3 fields will produce a number
in B45?

Thanks ^_^



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

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