Excel IF?

%3CLINGO-SUB%20id%3D%22lingo-sub-2745473%22%20slang%3D%22en-US%22%3EExcel%20IF%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2745473%22%20slang%3D%22en-US%22%3E%3CP%3EI%20want%20C23%20to%20equal%20zero%20if%20A17%3D0%20%2C%20if%20not%20then%20roundup(A17%2FB17%2C0)-C17.%26nbsp%3B%20Here%20is%20what%20I%20tried%20IF(OR(A17%3D%220%22%2C%20C23%20%3D0)%2C%20IF(A17%26gt%3B%220%22%2C%20Roundup(A17%2FB17%2C0)-C17)).%26nbsp%3B%20Any%20help%20is%20greatly%20appreciated.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2745473%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-2745497%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20IF%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2745497%22%20slang%3D%22en-US%22%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel-formula%22%3E%3CCODE%3E%3DIF(C23%3D0%2C0%2CROUNDUP(A17%2FB17%2C0)-C17)%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1154272%22%20target%3D%22_blank%22%3E%40saiken1770%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2745509%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%20IF%3F%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2745509%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1154272%22%20target%3D%22_blank%22%3E%40saiken1770%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E0%20is%20a%20text%20value%2C%20not%20a%20number.%20And%20you%20cannot%20refer%20to%20C23%20in%20the%20formula%20in%20C23.%20Change%20the%20formula%20to%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3DIF(A17%3D0%2C%200%2C%20ROUNDUP(A17%2FB17%2C%200)-C17)%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

I want C23 to equal zero if A17=0 , if not then roundup(A17/B17,0)-C17.  Here is what I tried IF(OR(A17="0", C23 =0), IF(A17>"0", Roundup(A17/B17,0)-C17)).  Any help is greatly appreciated.

2 Replies

 

 

=IF(A17=0,0,ROUNDUP(A17/B17,0)-C17)

 

@saiken1770 

@saiken1770 

0 is a text value, not a number. And you cannot refer to C23 in the formula in C23. Change the formula to

 

=IF(A17=0, 0, ROUNDUP(A17/B17, 0)-C17)