سؤال

I need to add three cells in excel 2010, for example:

val1 = 1

val2 = 3

val3 = #N/A

sum = 4

As you can see, I need the result to be a number, not #N/A. I would like #N/A to count as 0.

Thank you!

هل كانت مفيدة؟

المحلول 2

I have solved it myself, but L42 pointed me into the right direction.

In my table, data is located in J2, K2 and L2 and the sum is in M2 where I entered the final formula: =IFERROR(J2;0)+IFERROR(K2;0)+IFERROR(L2;0)

which basically means that I have manually added the 3 cells but checked for errors first, for each cell, with the function iferror and returned 0 if error exists.

Thank you!

نصائح أخرى

Try this:

=SUM(IF(ISERROR(A1:A3),0,A1:A3))

Entered as Array Formula by pressing Ctrl+Shft+Enter in Cell A4 assuming your data is in Column A.
Change the address otherwise.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top