View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Jason Lepack Jason Lepack is offline
external usenet poster
 
Posts: 120
Default Ignore #N/A in formula

On Feb 13, 10:18 pm, wrote:
Thanks for getting back to me.
The formula you posted only displays a result if there isn't an #N/A
anywhere in the formula, I want the result excluding the n/a ie if A2
= #N/A ; A3 = 1 ; B2 = 3 ; B3 = 2 and A1 = 2 i want the result ((#N/
A*1)+(3*2))/2 to equal 3 not a blank, so in essence I want to treat
the #N/A like a 0
Does that make sense?


=if(isna(A1),0,((if(isna(A2),0,A2)*if(isna(A3),0,A 3))+(if(isna(B2),
0,B2)*if(isna(B3),0,B3))+(if(isna(C2),0,C2)*if(isn a(C3),0,C3)))/A1)

I specifically isolated the check of A1 outside the formula so as to
prevent a div/0 error.