Excel

%3CLINGO-SUB%20id%3D%22lingo-sub-1856316%22%20slang%3D%22en-US%22%3EExcel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1856316%22%20slang%3D%22en-US%22%3Ei%20put%20%3DIF((E41-D41)%26gt%3B8%2C8%2C(E41-D41))*24-9%20this%20formula%20when%20input%20given.%20But%20when%20input%20not%20given%20it%20show%20-9%20so%20i%20need%20to%20remain%20empty%20cell%20if%20input%20empty.%20Please%20correct%20this%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1856316%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-1856355%22%20slang%3D%22en-US%22%3ERe%3A%20Excel%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1856355%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F858484%22%20target%3D%22_blank%22%3E%40ansari_aiyaz%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat%20would%20be%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIF(OR(D41%3D%22%22%2CE41%3D%22%22)%2C%22%22%2CIF((E41-D41)%26gt%3B8%2C8%2C(E41-D41))*24-9)%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EBut%20I'm%20not%20sure%20that%20the%20formula%20does%20what%20you%20want...%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor
i put =IF((E41-D41)>8,8,(E41-D41))*24-9 this formula when input given. But when input not given it show -9 so i need to remain empty cell if input empty. Please correct this
1 Reply
Highlighted

@ansari_aiyaz 

That would be

 

=IF(OR(D41="",E41=""),"",IF((E41-D41)>8,8,(E41-D41))*24-9)

 

But I'm not sure that the formula does what you want...