IFS with AND

%3CLINGO-SUB%20id%3D%22lingo-sub-2397532%22%20slang%3D%22en-US%22%3EIFS%20with%20AND%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2397532%22%20slang%3D%22en-US%22%3E%3CP%3EI%20was%20trying%20to%20set%20multiple%20conditions%20for%20IFS%20with%20AND%20for%20the%20conditions.%3C%2FP%3E%3CP%3EIFS((AND(U32%3D1%2C%20V32%3CS32%3E%3C%2FS32%3E%3C%2FP%3E%3CP%3EIt%20kept%20returning%20an%20error.%3C%2FP%3E%3CP%3EAny%20advice%3F%20Thanks%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2397532%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-2397696%22%20slang%3D%22en-US%22%3ERe%3A%20IFS%20with%20AND%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2397696%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1066292%22%20target%3D%22_blank%22%3E%40phuakt565%3C%2FA%3E%26nbsp%3BTry%20it%20this%20way%3A%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIF(AND(OR(U32%3D1%2C%20U32%3D2)%2CV32%3CS32%3E%3C%2FS32%3E%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3EYou%20seem%20to%20want%20return%20V32%2B5%20when%20U32%20equals%201%20or%202%20AND%20V32%20is%20less%20than%20S32.%20but%20you%20also%20need%20to%20specify%20what%20to%20do%20in%20case%20these%20criteria%20are%20not%20met.%20Hence%2C%20the%20%22x%22%20at%20the%20end.%20Replace%20it%20with%20whatever%20formula%20or%20text%20you%20need.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Visitor

I was trying to set multiple conditions for IFS with AND for the conditions.

IFS((AND(U32=1, V32<S32), (V32+5)), (AND(U32=2, V32<S32), (V32+5))).

It kept returning an error.

Any advice? Thanks

 

2 Replies

@phuakt565 Try it this way:

=IF(AND(OR(U32=1, U32=2),V32<S32),V32+5,"x")

You seem to want return V32+5 when U32 equals 1 or 2 AND V32 is less than S32. but you also need to specify what to do in case these criteria are not met. Hence, the "x" at the end. Replace it with whatever formula or text you need.

@phuakt565 

As variant

=V32+SUM(IF(U32={1,2},5,0))