Discussions

Expand all | Collapse all

Case/if

  • 1.  Case/if

    Posted 05-06-2020 15:46
    I am running into an issue with the following formula…. please help.



    ------------------------------
    Brandy Nunes
    ------------------------------


  • 2.  RE: Case/if

    Posted 05-06-2020 16:09
    Edited by Austin K 05-06-2020 16:09
    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]
    )


  • 3.  RE: Case/if

    Posted 05-07-2020 10:17
    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
    ------------------------------



  • 4.  RE: Case/if

    Posted 05-07-2020 11:06
    Edited by Adam Keever 05-07-2020 11:07
    Comment removed
    ------------------------------
    Adam Keever
    ------------------------------



  • 5.  RE: Case/if

    Posted 05-07-2020 11:07
    not tested, but this sounds like what you want


    If(
    [Supplier]="Maintenance Supply", "Zenovia", 
    [Supplier]="Ferguson", "Manuela", 
    [Supplier]="HD Supply", "Manuela", 
    begins([Supplier],"F"),"Zenovia",
    begins([Supplier],"G"),"Zenovia",
    begins([Supplier],"H"),"Zenovia",
    begins([Supplier],"I"),"Zenovia",
    begins([Supplier],"J"),"Zenovia",
    begins([Supplier],"K"),"Zenovia",
    begins([Supplier],"L"),"Zenovia",
    //else
    "Manuela")



    ------------------------------
    Mark Shnier (YQC)
    Quick Base Solution Provider
    Your Quick Base Coach
    http://QuickBaseCoach.com
    mark.shnier@gmail.com
    ------------------------------