IFS Function Help

%3CLINGO-SUB%20id%3D%22lingo-sub-2275778%22%20slang%3D%22en-US%22%3EIFS%20Function%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2275778%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FP%3E%3CP%3EI%20am%20trying%20to%20do%20an%20IFS%20function%20within%20a%20sheet%20but%20if%20the%20first%20argument%20is%20FALSE%20then%20I%20would%20like%20it%20to%20carry%20over%20to%20Logical%20test%202.%20Here%20is%20a%20few%20photos%20of%20the%20problem%3A%3C%2FP%3E%3CP%3ESo%20if%20Logical%20test%201%20is%20true%3A%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Razorbackrob_0-1618570469381.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F273295i9A932CEB8F4CAB82%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Razorbackrob_0-1618570469381.png%22%20alt%3D%22Razorbackrob_0-1618570469381.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EIf%20Logcal%20test%201%20is%20False%20then%20it%20returns%20N%2FA%20when%20I%20would%20like%20it%20to%20show%20the%20results%20of%20Logical%20Test%202%2C%20is%20there%20a%20way%20around%20this%3F%205.063%20is%20the%20correct%20answer%20to%20show.%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Razorbackrob_1-1618570532617.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F273296iA0A28F1D8AC31D49%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Razorbackrob_1-1618570532617.png%22%20alt%3D%22Razorbackrob_1-1618570532617.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%20in%20advance!%26nbsp%3B%3C%2FP%3E%3CP%3ERob%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2275778%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EOffice%20365%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2275970%22%20slang%3D%22en-US%22%3ERe%3A%20IFS%20Function%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2275970%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1028226%22%20target%3D%22_blank%22%3E%40Razorbackrob%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EInstead%20of%20text%26nbsp%3B%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%22here%20is%20if%20nothing%20of%20above%20works%22%3C%2FCODE%3E%3C%2FPRE%3E%0A%3CP%3Eyou%20shall%20insert%20formula%20which%20returns%20desired%20result.%20If%20you'd%20like%20to%20return%20exactly%20the%20same%20result%20independently%20of%26nbsp%3B%26nbsp%3BB162%3D%22GB12%22%20returns%20TRUE%20of%20FALSE%2C%20when%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIFS(%0AB162%3D%22GB16%22%2C%0A%20%20%20%20IF(OR(O162%3D%22311295%22%2CO162%3D%22311296%22%2CO162%3D%22311297%22%2CO162%3D%22311299%22%2CO162%3D%22311293%22)%2C%0A%20%20%20%20%20%20%20Method!%24G%2435%2C%0A%20%20%20%20%20%20%20INDEX(Method!%24A%2434%3A%24H%2434%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20MATCH('Own%20Prod'!AG162%2CMethod!%24A%2434%2C0)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20IF('Own%20Prod'!A162%3D%22Burnt%22%2C7%2C8)%0A%20%20%20%20%20%20%20)%0A%20%20%20%20)%2C%0ATRUE%2C%0A%20%20%20%20IF(OR(O162%3D%22CL01%22)%2C%0A%20%20%20%20%20%20%20Method!%24G%2430%2C%0A%20%20%20%20%20%20%20INDEX(Method!%24A%2429%3A%24H%2429%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20MATCH('Own%20Prod'!AG162%2CMethod!%24A%2429%2C0)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20IF('Own%20Prod'!A162%3D%22Unburnt%22%2C8%2C7)%0A%20%20%20%20%20%20%20)%0A%20%20%20%20)%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2275854%22%20slang%3D%22en-US%22%3ERe%3A%20IFS%20Function%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2275854%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%2C%20but%20unfortunately%20I%20still%20have%20the%20same%20error%20only%20now%20it%20displays%20the%20text%20answer%20instead%20of%20NA.%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Razorbackrob_0-1618574266058.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F273307i863BF36CF4940A19%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Razorbackrob_0-1618574266058.png%22%20alt%3D%22Razorbackrob_0-1618574266058.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EMaybe%20I%20need%20to%20use%20a%20nested%20IF%20instead%2C%20I%20think%20the%20problem%20lies%20there...%20as%20for%20some%20reason%20i%20can't%20get%20it%20to%20display%20the%20result%20of%20the%20Logical%20test%202.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2275823%22%20slang%3D%22en-US%22%3ERe%3A%20IFS%20Function%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2275823%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1028226%22%20target%3D%22_blank%22%3E%40Razorbackrob%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EI'm%20not%20sure%20what%20exactly%20you'd%20like%20to%20calculate%2C%20but%20that%20could%20be%20like%3C%2FP%3E%0A%3CPRE%20class%3D%22lia-code-sample%20language-excel%22%3E%3CCODE%3E%3DIFS(%0AB162%3D%22GB16%22%2C%0A%20%20%20%20IF(OR(O162%3D%22311295%22%2CO162%3D%22311296%22%2CO162%3D%22311297%22%2CO162%3D%22311299%22%2CO162%3D%22311293%22)%2C%0A%20%20%20%20%20%20%20Method!%24G%2435%2C%0A%20%20%20%20%20%20%20INDEX(Method!%24A%2434%3A%24H%2434%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20MATCH('Own%20Prod'!AG162%2CMethod!%24A%2434%2C0)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20IF('Own%20Prod'!A162%3D%22Burnt%22%2C7%2C8)%0A%20%20%20%20%20%20%20)%0A%20%20%20%20)%2C%0AB162%3D%22GB12%22%2C%0A%20%20%20%20IF(OR(O162%3D%22CL01%22)%2C%0A%20%20%20%20%20%20%20Method!%24G%2430%2C%0A%20%20%20%20%20%20%20INDEX(Method!%24A%2429%3A%24H%2429%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20MATCH('Own%20Prod'!AG162%2CMethod!%24A%2429%2C0)%2C%0A%20%20%20%20%20%20%20%20%20%20%20%20%20IF('Own%20Prod'!A162%3D%22Unburnt%22%2C8%2C7)%0A%20%20%20%20%20%20%20)%0A%20%20%20%20)%2C%0ATRUE%2C%0A%20%20%20%20%22here%20is%20if%20nothing%20of%20above%20works%22%0A)%3C%2FCODE%3E%3C%2FPRE%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2275800%22%20slang%3D%22en-US%22%3ERe%3A%20IFS%20Function%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2275800%22%20slang%3D%22en-US%22%3EThanks%20Sergei%2C%3CBR%20%2F%3E%3CBR%20%2F%3EHow%20would%20I%20enter%20that%20into%20Excel%3F%3CBR%20%2F%3EMy%20current%20formula%20is%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3DIFS(B162%3D%22GB16%22%2CIF(OR(O162%3D%22311295%22%2CO162%3D%22311296%22%2CO162%3D%22311297%22%2CO162%3D%22311299%22%2CO162%3D%22311293%22)%2CMethod!%24G%2435%2CINDEX(Method!%24A%2434%3A%24H%2434%2CMATCH('Own%20Prod'!AG162%2CMethod!%24A%2434%2C0)%2CIF('Own%20Prod'!A162%3D%22Burnt%22%2C7%2C8)))%2CB162%3D%22GB12%22%2CIF(OR(O162%3D%22CL01%22)%2CMethod!%24G%2430%2CINDEX(Method!%24A%2429%3A%24H%2429%2CMATCH('Own%20Prod'!AG162%2CMethod!%24A%2429%2C0)%2CIF('Own%20Prod'!A162%3D%22Unburnt%22%2C8%2C7))))%3CBR%20%2F%3E%3CBR%20%2F%3EWould%20i%20be%20best%20deleting%20Test%202%20and%20entering%20the%20word%20True%20at%20the%20end%20of%20Test%20one%3F%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2275793%22%20slang%3D%22en-US%22%3ERe%3A%20IFS%20Function%20Help%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2275793%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1028226%22%20target%3D%22_blank%22%3E%40Razorbackrob%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIFS()%20stops%20formula%20evaluation%20on%20the%20first%20TRUE%20condition%20and%20ignores%20the%20rest.%20You%20may%20use%20something%20like%3C%2FP%3E%0A%3CP%3E%3DIFS(test1%2C%20result1%2C%20TRUE%2C%20result%20if%20test1%20failed)%3C%2FP%3E%3C%2FLINGO-BODY%3E
New Contributor

Hi,

I am trying to do an IFS function within a sheet but if the first argument is FALSE then I would like it to carry over to Logical test 2. Here is a few photos of the problem:

So if Logical test 1 is true:

Razorbackrob_0-1618570469381.png

If Logcal test 1 is False then it returns N/A when I would like it to show the results of Logical Test 2, is there a way around this? 5.063 is the correct answer to show. 

Razorbackrob_1-1618570532617.png

 

Thanks in advance! 

Rob 

 

5 Replies

@Razorbackrob 

IFS() stops formula evaluation on the first TRUE condition and ignores the rest. You may use something like

=IFS(test1, result1, TRUE, result if test1 failed)

Thanks Sergei,

How would I enter that into Excel?
My current formula is:

=IFS(B162="GB16",IF(OR(O162="311295",O162="311296",O162="311297",O162="311299",O162="311293"),Method!$G$35,INDEX(Method!$A$34:$H$34,MATCH('Own Prod'!AG162,Method!$A$34,0),IF('Own Prod'!A162="Burnt",7,8))),B162="GB12",IF(OR(O162="CL01"),Method!$G$30,INDEX(Method!$A$29:$H$29,MATCH('Own Prod'!AG162,Method!$A$29,0),IF('Own Prod'!A162="Unburnt",8,7))))

Would i be best deleting Test 2 and entering the word True at the end of Test one?

@Razorbackrob 

I'm not sure what exactly you'd like to calculate, but that could be like

=IFS(
B162="GB16",
    IF(OR(O162="311295",O162="311296",O162="311297",O162="311299",O162="311293"),
       Method!$G$35,
       INDEX(Method!$A$34:$H$34,
             MATCH('Own Prod'!AG162,Method!$A$34,0),
             IF('Own Prod'!A162="Burnt",7,8)
       )
    ),
B162="GB12",
    IF(OR(O162="CL01"),
       Method!$G$30,
       INDEX(Method!$A$29:$H$29,
             MATCH('Own Prod'!AG162,Method!$A$29,0),
             IF('Own Prod'!A162="Unburnt",8,7)
       )
    ),
TRUE,
    "here is if nothing of above works"
)

@Sergei Baklan 

Thanks, but unfortunately I still have the same error only now it displays the text answer instead of NA.

Razorbackrob_0-1618574266058.png

Maybe I need to use a nested IF instead, I think the problem lies there... as for some reason i can't get it to display the result of the Logical test 2. 

 

@Razorbackrob 

Instead of text 

"here is if nothing of above works"

you shall insert formula which returns desired result. If you'd like to return exactly the same result independently of  B162="GB12" returns TRUE of FALSE, when

=IFS(
B162="GB16",
    IF(OR(O162="311295",O162="311296",O162="311297",O162="311299",O162="311293"),
       Method!$G$35,
       INDEX(Method!$A$34:$H$34,
             MATCH('Own Prod'!AG162,Method!$A$34,0),
             IF('Own Prod'!A162="Burnt",7,8)
       )
    ),
TRUE,
    IF(OR(O162="CL01"),
       Method!$G$30,
       INDEX(Method!$A$29:$H$29,
             MATCH('Own Prod'!AG162,Method!$A$29,0),
             IF('Own Prod'!A162="Unburnt",8,7)
       )
    )
)