SOLVED
Home

Excel If Functions

%3CLINGO-SUB%20id%3D%22lingo-sub-278247%22%20slang%3D%22en-US%22%3EExcel%20If%20Functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-278247%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20trying%20to%20create%20an%20IF%20statement%2C%20but%20it%20is%20not%20working.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20it%20to%20say%20if%20cell1%20and%20cell2%20are%20NA%20the%20true%20is%200%20but%20if%20it%20is%20%26gt%3B0%20to%20%3D%20the%20sum%20of%20cell1%20and%20cell2.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20tried%20so%20many%20ways%2C%20but%20I%20can%20never%20get%20the%200%20result%2C%20but%20if%20there%20are%20%23's%20in%20the%20cells%20it%20will%20return%20the%20sum%20of%20those%202%20cells.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-278247%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-278730%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20If%20Functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-278730%22%20slang%3D%22en-US%22%3EThank%20you!%20This%20worked!%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-278282%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20If%20Functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-278282%22%20slang%3D%22en-US%22%3E%3CP%3EHi%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%3E%3DIFNA(SUM(A1%3AA2)%2C0)%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-278251%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20If%20Functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-278251%22%20slang%3D%22en-US%22%3Etry%3A%3CBR%20%2F%3Eassuming%20cell1%20is%20A1%20and%20cell2%20is%20A2%3CBR%20%2F%3E%3DIF((A1%2BA2)%26gt%3B0%2CA1%2BA2%2C0)%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E
Whitney Johnson
New Contributor

I am trying to create an IF statement, but it is not working.

 

I need it to say if cell1 and cell2 are NA the true is 0 but if it is >0 to = the sum of cell1 and cell2.

 

I have tried so many ways, but I can never get the 0 result, but if there are #'s in the cells it will return the sum of those 2 cells.

3 Replies
try:
assuming cell1 is A1 and cell2 is A2
=IF((A1+A2)>0,A1+A2,0)
Solution

Hi

 

=IFNA(SUM(A1:A2),0)

 

Thank you! This worked!