How would I make this formula return value of "n/a" if nothing to calculate?

Aimee S.

Board Regular
Joined
Sep 28, 2010
Messages
236
Office Version
  1. 365
Platform
  1. Windows
Currently the value returned if there is no data in AW to calculate is #DIV/0!.

How would I add to this formula the criteria that if there are no values to average, return value "n/a"?

=AVERAGE(IF($K$3:$K$5000=1,IF($C$3:$C$5000="CAP - Backhaul",IF(TEXT($AG$3:$AG$5000,"mmmyyyy")=TEXT(NOW()-DAY(NOW()),"mmmyyyy"),IF($AW$3:$AW$5000="Under",1,IF($AW$3:$AW$5000="Over",0))))))
 
Last edited:

Excel Facts

Difference between two dates
Secret function! Use =DATEDIF(A2,B2,"Y")&" years"&=DATEDIF(A2,B2,"YM")&" months"&=DATEDIF(A2,B2,"MD")&" days"
Hi,

May be..

=LOOKUP(9.9999E+307,CHOOSE({1,2},NA(),AVERAGE(IF($K$3:$K$5000=1,IF($C$3:$C$5000="CAP - Backhaul",IF(TEXT($AG$3:$AG$5000,"mmmyyyy")=TEXT(NOW()-DAY(NOW()),"mmmyyyy"),IF($AW$3:$AW$5000="Under",1,IF($AW$3:$AW$5000="Over",0))))))))
 
Upvote 0
It says when trying that formula you provided:

"The specified formula you entered cannot be entered because it uses more levels of nesting than are allowed in the current file format"

I use Excel 2010

File format is .xls for backwards compatibility.
 
Upvote 0
Currently the value returned if there is no data in AW to calculate is #DIV/0!.

How would I add to this formula the criteria that if there are no values to average, return value "n/a"?

=AVERAGE(IF($K$3:$K$5000=1,IF($C$3:$C$5000="CAP - Backhaul",IF(TEXT($AG$3:$AG$5000,"mmmyyyy")=TEXT(NOW()-DAY(NOW()),"mmmyyyy"),IF($AW$3:$AW$5000="Under",1,IF($AW$3:$AW$5000="Over",0))))))
If you're using Excel 2007 or later...

=IFERROR(your formula here,"N/A")

You do want the TEXT string N/A and not the #N/A error, right?
 
Upvote 0
I tried this:

=IFERROR(AVERAGE(IF('3-FactoryCalculation'!$K$3:'3-FactoryCalculation'!$K$5000=1,IF('3-FactoryCalculation'!$C$3:'3-FactoryCalculation'!$C$5000="Base",IF(TEXT('3-FactoryCalculation'!$AG$3:'3-FactoryCalculation'!$AG$5000,"mmmyyyy")=TEXT(NOW()-DAY(NOW()),"mmmyyyy"),IF('3-FactoryCalculation'!$AW$3:'3-FactoryCalculation'!$AW$5000="Under",1,IF('3-FactoryCalculation'!$AW$3:'3-FactoryCalculation'!$AW$5000="Over",0)))))),"n/a")

And just got back a different percentage than the right one.
 
Upvote 0
Agghh I got it. Forgot the CTRL SHIFT ENTER confirmation part hehehehe.

Thanks!!!! :)
 
Upvote 0

Forum statistics

Threads
1,224,552
Messages
6,179,487
Members
452,917
Latest member
MrsMSalt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top