Forum Discussion

Militus's avatar
Militus
Copper Contributor
Dec 30, 2023
Solved

multiple if scenarios

How can I formulate the following 3 scenarios: 

 

Assuming j9 cannot be yes if k9 is vacant AND my current tab is "Feb" and previous tab is "Jan", how do I formulate the following: 

 

if k9 = "VACANT", i9 should equal zero 

if j9 = "Yes", i9 should equal f9-g9

if k9 is not "VACANT" and j9 = "No", I need i9 to equal my previous tab's i9-h9

 

If I use =IF(J9="Yes",F9-G9,Jan!i9-H9), this doesn't consider k9 as "VACANT"

If I use =IF(K9="VACANT",0,Jani9-H9), this doesn't consider j9 as "Yes"

 

How do I combined these? 

  • Militus 

    My apologies, I forgot a double quote.

     

    =IF(K9="VACANT", "", IF(J9="Yes", F9-G9, IF(J9="No", Jan!I9-H9, "")))

    • Militus's avatar
      Militus
      Copper Contributor
      Thanks. I'm getting an error though: "there's a problem with the formula. Not trying to type a formula", etc.

      =IF(K9="VACANT, "", IF(J9="Yes", F9-G9, IF(J9="No", Jan!I9-H9, "")))

      • Militus 

        My apologies, I forgot a double quote.

         

        =IF(K9="VACANT", "", IF(J9="Yes", F9-G9, IF(J9="No", Jan!I9-H9, "")))

Resources