ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   #value! Error (https://www.excelbanter.com/excel-worksheet-functions/193699-value-error.html)

sony654

#value! Error
 
The below function returns a #value! error. I would like the below function
to return "-" only if every cell in the range is empty. Help is appreciated
writing this.

=IF(B56:af56="","-",AVERAGE(B56:AF56))


--
Sony Luvy

T. Valko

#value! Error
 
Try this:

=IF(COUNT(B56:AF56),AVERAGE(B56:AF56),"-")


--
Biff
Microsoft Excel MVP


"sony654" wrote in message
...
The below function returns a #value! error. I would like the below
function
to return "-" only if every cell in the range is empty. Help is
appreciated
writing this.

=IF(B56:af56="","-",AVERAGE(B56:AF56))


--
Sony Luvy




sony654

#value! Error
 
Biff, Thanks again, this worked great - Tom
--
Sony Luvy


"T. Valko" wrote:

Try this:

=IF(COUNT(B56:AF56),AVERAGE(B56:AF56),"-")


--
Biff
Microsoft Excel MVP


"sony654" wrote in message
...
The below function returns a #value! error. I would like the below
function
to return "-" only if every cell in the range is empty. Help is
appreciated
writing this.

=IF(B56:af56="","-",AVERAGE(B56:AF56))


--
Sony Luvy





T. Valko

#value! Error
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"sony654" wrote in message
...
Biff, Thanks again, this worked great - Tom
--
Sony Luvy


"T. Valko" wrote:

Try this:

=IF(COUNT(B56:AF56),AVERAGE(B56:AF56),"-")


--
Biff
Microsoft Excel MVP


"sony654" wrote in message
...
The below function returns a #value! error. I would like the below
function
to return "-" only if every cell in the range is empty. Help is
appreciated
writing this.

=IF(B56:af56="","-",AVERAGE(B56:AF56))


--
Sony Luvy








All times are GMT +1. The time now is 04:05 AM.

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