Help with formula

%3CLINGO-SUB%20id%3D%22lingo-sub-1491345%22%20slang%3D%22en-US%22%3EHelp%20with%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491345%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EI%20have%20a%20formula%20in%20a%20simple%20spreadsheet%20that%20I%20would%20like%20to%20expand%20on.%3C%2FP%3E%3CP%3E%3DIF(C5%26gt%3B0%2CE4-C5)%20OR%20(D5%26gt%3B0%2CE4%2BD5)%3C%2FP%3E%3CP%3ECan%20anyone%20please%20help%20me%20correct%20this%20formula%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1491345%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1491366%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491366%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F710909%22%20target%3D%22_blank%22%3E%40Twmorgs%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESee%20if%20you%20want%20this...%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-applescript%22%3E%3CCODE%3E%3DIF(C5%26gt%3B0%2CE4-C5%2CIF(D5%26gt%3B0%2CE4%2BD5%2C%22%22))%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1491443%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20with%20formula%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1491443%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F710909%22%20target%3D%22_blank%22%3E%40Twmorgs%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAs%20variant%20perhaps%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DE4-C5*(C5%26gt%3B0)%2BD5*(D5%26gt%3B0)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Visitor

Hi,

I have a formula in a simple spreadsheet that I would like to expand on.

=IF(C5>0,E4-C5) OR (D5>0,E4+D5)

Can anyone please help me correct this formula

Thanks

2 Replies
Highlighted

@Twmorgs 

 

See if you want this...

 

=IF(C5>0,E4-C5,IF(D5>0,E4+D5,""))
Highlighted

@Twmorgs 

As variant perhaps

=E4-C5*(C5>0)+D5*(D5>0)