Forum Discussion

Able1974's avatar
Able1974
Copper Contributor
Jan 02, 2022

Sum Specific Cells with #N/A

I need to add only specific cells in a row, and some may have #N/A, need a formula that will ignore it and still add remaining cells. 

=SUM(I4,N4,S4,X4,AC4,AH4)

1 Reply

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Able1974 If you would be summing an array (i.e. range of adjacent cells) that could include an #N/A error, you could have used AGGREGATE with function number 9 (SUM) and option 6 (ignore errors).

    In your case it's probably easiest to wrap the formulae that could produce the #N/A error in an IFNA( ) function and have it return a text like N/A. That would something like:

    =IFNA(<formula>, "N/A")

     

    Now you can use the formula as you described in your question, as SUM will ignore cells with texts.

Resources