Ignoring Cells Returning #N/A

V

Vasquoy

I am setting up a sheet that when a code is entered elsewhere in the workbook
it fills the information in on a summary sheet.

For various reasons, we have a set number of lines (say 5) but if we only
enter 3 codes the other two show up as #n/a because there is no code entered
although the formula is there.

On the summary sheet we need to do a simple =sum() function but if one of
the cells contains #n/a then it won't calculate it.

Is there a way to get the sum function to ignore any cells which come up as
#n/a but to include them when it has a proper value?
 
R

Roger Govier

Hi

Wrap your formulae in an IF function.
=IF(input_cell="","",your_formula)

Change input-Cell to the cell reference where you input your code, and
substitute your actual formula for your_formula
 
D

Dave Peterson

You could use a formula like:
=SUMIF(A:A,"<1E37")
1E37 is a very large number--1 followed by 37 0's.

Or if the only errors in the =na() error:
=SUMIF(A:A,"<>#N/A")

You could write the formulas like this, too:
=SUMIF(A:A,"<"&1E+37)
=SUMIF(A:A,"<>"&"#N/A")

It may make it easier to understand.
 
T

TK

Hi,
I do a lot of formulas in Excel and as Jn specified, you should use one of
the built-in functions to accomplish your task. Use IsNA() or in general for
any errors, use IsError() functions, which handles any type of errors like
#VALUE, #REF, etc...
 

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

Similar Threads

Dumb question alert! What program to use? 0
VLOOKUP returning #N/A ?? 3
Getting "N/A" 2
Ignoring specific number 1
VLOOKUP returning #N/A result 2
sum, except #N/A 3
wdActiveEndSectionNumber 1
ignore #n/a 2

Top