Thread: #N/A Shortcut
View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_7_] Bob Phillips[_7_] is offline
external usenet poster
 
Posts: 1,120
Default #N/A Shortcut

=SUMPRODUCT(--(NOT(ISERROR(A1:A100))),A1:A100)

--
HTH

Bob Phillips

"Dean" wrote in message
...
Often I am using lookup functions which may or may not find an exact match
(which is what I want). From these results, typically in a column, I

might
want to create a sum or, using two such columns, even a sumproduct result.

The usual way I deal with this is to write an if statement that says, if

the
vlookup result is #N/A, then substitute zero. This yields long formulas
since the lookup function is already pretty long.

I'm wondering if there is a more elegant way to have the sumproduct

compute
while ignoring all entries that are #N/A. Perhaps I could do this with a
sumif type function, but I don't know how to do this.

Help, please.

Dean