IF with multiple conditions

%3CLINGO-SUB%20id%3D%22lingo-sub-1740351%22%20slang%3D%22en-US%22%3EIF%20with%20multiple%20conditions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1740351%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20having%20a%20hard%20time%20and%20hope%20someone%20can%20help%20please%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EIf%20C4%20says%20%22DDR%22%2C%20I%20need%20cells%20C7%26amp%3B8%20to%20divide%20by%202%2C%20and%20D7%2C8%2C%26amp%3B9%20to%20multiply%20by%202.%20If%20C4%20says%20%22Walk%22%2C%20then%20I%20no%20division%20or%20multiplication%20needed.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1740351%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1740441%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20with%20multiple%20conditions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1740441%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F779945%22%20target%3D%22_blank%22%3E%40rkolenda%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThat%20could%20be%20like%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DSUM(A4%2C-C4%2C-Q8)%2F(1%2B(%24C%244%3D5))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Efor%20C7%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DD4*2*(1%2B(%24C%244%3D5))%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Efor%20D7%3C%2FP%3E%0A%3CP%3ESimilar%20for%20other%20cells.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1740446%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20with%20multiple%20conditions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1740446%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F779945%22%20target%3D%22_blank%22%3E%40rkolenda%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EThe%20actual%20value%20of%20C4%20is%203.5%20or%205%3B%20you%20display%20this%20as%20Walk%20or%20DDR%20by%20using%20a%20custom%20number%20format.%3C%2FP%3E%0A%3CP%3ESo%20the%20formula%20in%20C7%20can%20be%3A%20%3D(A4-Q8)%2FIF(C4%3D5%2C2%2C1)%2C%20and%20in%20D7%3A%20%3DD4*2*IF(C4%3D5%2C2%2C1)%3C%2FP%3E%0A%3CP%3ESee%20the%20attached%20version.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1740865%22%20slang%3D%22en-US%22%3ERe%3A%20IF%20with%20multiple%20conditions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1740865%22%20slang%3D%22en-US%22%3EThank%20you%20for%20the%20help!%3C%2FLINGO-BODY%3E
Highlighted
New Contributor

I am having a hard time and hope someone can help please? 

 

If C4 says "DDR", I need cells C7&8 to divide by 2, and D7,8,&9 to multiply by 2. If C4 says "Walk", then I no division or multiplication needed.

 

Thanks in advance

4 Replies
Highlighted

@rkolenda 

That could be like

=SUM(A4,-C4,-Q8)/(1+($C$4=5))

for C7 

=D4*2*(1+($C$4=5))

for D7

Similar for other cells.

Highlighted

@rkolenda 

The actual value of C4 is 3.5 or 5; you display this as Walk or DDR by using a custom number format.

So the formula in C7 can be: =(A4-Q8)/IF(C4=5,2,1), and in D7: =D4*2*IF(C4=5,2,1)

See the attached version.

Highlighted
Thank you for the help!
Highlighted

@rkolenda , you are welcome