Forum Discussion

BrandyNunes1's avatar
BrandyNunes1
Qrew Member
5 years ago

Case/if

I am running into an issue with the following formula…. please help.



------------------------------
Brandy Nunes
------------------------------
  • AustinK's avatar
    AustinK
    Qrew Commander
    In the future it is almost always easier if you post the actual text of your formula and also any errors it is giving you.

    You only need to have 1 IF at the end of the formula there. without seeing the error it looks like to me that your IFs are the problem. Your first IF in the formula is set up as the only IF. Your IF needs a condition, an action to take if it is true, and then a false for a single line. If you want multiple lines then the false needs to be the next line, which I am finding is hard to explain through text. Hopefully the below example explains it well enough.

    IF(
    [condition]=[whatever], [if True do this],
    [condition]=[something], [if True do this2],
    [condition]=[purple], [if True do this3], [if False do this]
    )
    • BrandyNunes1's avatar
      BrandyNunes1
      Qrew Member
      That didn't quite work. :( Here is what I am trying to do: if the supplier name starts with the letters, F, G, H, I, J, K, or L then it is to return the name Zenovia, if not Manuela. Also if the supplier = Maintenance Supply return Zenovia, if not Manuela, and if the supplier = HD Supply return Manuela, if not Zenovia. 

      Case(Left([Supplier],1),
      "F","Zenovia",
      "G","Zenovia",
      "H","Zenovia",
      "I","Zenovia",
      "J","Zenovia",
      "K","Zenovia",
      "L","Zenovia",
      If([Supplier]="Maintenance Supply", "Zenovia", "Manuela",
      If([Supplier]="Ferguson", "Manuela", "Zenovia",
      If([Supplier]="HD Supply", "Manuela", "Zenovia")))))

      The error says "Expecting boolean but found text"


      ------------------------------
      Brandy Nunes
      ------------------------------
      • AdamKeever1's avatar
        AdamKeever1
        Qrew Commander
        Comment removed
        ------------------------------
        Adam Keever
        ------------------------------