Sum of a column if some rows contain #n/a

B

BZeyger

I am looking to add the contents of a column. Some of the values contain
#N/A. Is there a way to add the all of the values in the colums together ,
but ingnore the #N/A?

example:

Object 1 2
Object 2 #N/A
Object 3 #N/A
Object 4 1

Total 3
 
J

JE McGimpsey

The best way would be to eliminate the NA's. For instance, if they're
generated by a VLOOKUP(), trap the "match not found" error:

=IF(ISNA(MATCH(A1,J:J,FALSE)),"",VLOOKUP(A1,J:K,2,FALSE))

But you could also use this (array-entered: CTRL-SHIFT-ENTER or
CMD-RETURN):

=SUM(IF(ISNA(B1:B100),,B1:B100))
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top