Search code examples
google-sheetsgoogle-sheets-formula

How to combine 2 IFS formulas with several conditions into one


I am trying to combine 2 IFS formulas with some conditions into just one but I am missing something. enter image description here

Both formulas below:

Reit Tax:

=IF(AND(H2>10,C2="Reit"),CONCAT("± $ ",ROUND(H2*0.2,0)),"No")

Stock Tax:

=IF(AND(F2>20000,H2>0,C2="Stock"),CONCAT("± $ ",ROUND(H2*0.15,0)),"No")

I'm just failing in combining them into one. I tried this but it doesn't work:

=IFS(AND(H2>10,C2="Reit"),CONCAT("± $ ",ROUND(H2*0.2,0)), AND(F2>20000,H2>0,C2="Stock"),CONCAT("± $ ",ROUND(H2*0.15,0), "No"))

If you have any idea on what I'm missing, please help me. Thanks!


Solution

  • You need to balance the brackets after the final CONCAT and add a true value to force the "No" condition if neither of the two previous conditions is satisfied:

    =IFS(AND(H2>10,C2="Reit"),CONCAT("± $ ",ROUND(H2*0.2,0)), AND(F2>20000,H2>0,C2="Stock"),CONCAT("± $ ",ROUND(H2*0.15,0)),TRUE, "No")
    

    enter image description here