If you can make this change, I'd suggest going with Skip's earlier suggestion of using ISNA in the functions that are producing these unsightly returns.
Example:
Let's say you have
=VLookup(A1,B1:C10,2,0)
which is returning #N/A because the value in A1 isn't found in the range B1:C10. Then change the formula to this:
=If(IsNA(VLlookup(A1,B1:C10,2,0)),"",VLookup(A1,B1:C10,2,0))
Now you can just sum an entire column
=Sum(D)
If that would be entirely too much trouble, then you still needn't worry about hiding the rows containing #N/A. Or hide them to improve the appearance of the sheet. It is really up to you.
The following formula will work either way:
[COLOR=red white]=SumIf(D,"<>#N/A")[/color]
[tt]_____
[blue]-John[/blue][/tt]
[tab][red]The plural of anecdote is not data[/red]
Help us help you. Please read FAQ181-2886 before posting.
1) Fix the errors at source (Usually the advisable route), and best handled with the syntax, =IF(ISNA(Your_Formula),0,Your_Formula)
2) Compensate for the errors using an array formula that ignores errors such as the ones given, or using a non-array approach:-
=SUMIF($A$1:$A$25,"<>#N/A")
Note that this does not take into account cells that are only visible
Regards
Ken............
---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission
----------------------------------------------------------------------------
Personally i would use approach number 1 to get rid of the errors at source, and then use SUBTOTAL() if you need to sum only visible cells. You should also note though that SUBTOTAL in versions of Excel prior to 2003 will only work if the rows have been hidden by use of a filter, whereas in 2003 extra arguments were added to allow you to ignore manually hidden rows too.
Regards
Ken............
---------------------------------------------------------------------------- It's easier to beg forgiveness than ask permission
----------------------------------------------------------------------------
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.