How do you sum values in a coloumn when it contains #N/A in a ran.
Hi,
Assuming you cells to SUM are C2:C10, you can either:
- use SUMIF()
=SUMIF(C2:C10,"<#N/A",C2:C10)
- or make sure your vlookup-cells do not return N/A by checking for errors
in the formula:
=IF( ISNA( VLOOKUP(...)),"", VLOOKUP(...))
Then the sum would work fine.
- The main problem in the above method is that, if you have many columns of
VLOOKUP, since Vlookup appears twice in the formula, it will slows down
everything. So a better approach would be to dedicate a full hidden column ,
Say B, to
=Vlookup(...) 'returning a value or NA
This will just be used to see if there is a value or a NA.
Then, elsewhere, in other columns C, D, ... where there is a vlookup
rturning data, do:
column C: =IF(ISNA(B2), "", VLOOKUP(...))
column D: =IF(ISNA(B2), "", VLOOKUP(...))
I hope this helps
Regards,
Sebastien
"sa" wrote:
I have a range of cells that utilizes the VLOOKUP command to search for
numerical data by descrition and place it in a cell. Then I want to add the
numerical data with the sum function. But in some cells there is #N/A because
the numerical data isn't present. The Sum function always returns #N/A when
this occurs.
Can anyone help with this?
|