Formula field to count any 2 fields have yes selected, then do something

IF(
    (
        IF(ISPICKVAL(Field_1, "Yes"), 1, 0) +
        IF(ISPICKVAL(Field_2, "Yes"), 1, 0) +
        IF(ISPICKVAL(Field_3, "Yes"), 1, 0)
    ) >= 2,
    "Big",
    "Small"
)
IF(
    OR(
        ISBLANK(TEXT(Field_1)), 
        ISBLANK(TEXT(Field_2))
    ), 
    "", 
    IF(
        AND(
            ISPICKVAL(Field_1, "Yes"), 
            ISPICKVAL(Field_2, "Yes")
        ), 
        "Big", 
        "Small"
    )
)
IF(
    AND(
        ISPICKVAL(Field_1, "Yes"), 
        ISPICKVAL(Field_2, "Yes"), 
        CONTAINS(Field_3, "UK")
    ), 
    "", 
    IF(
        AND(
            CONTAINS(Field_3, "UK"), 
            OR(
                ISBLANK(TEXT(Field_1)), 
                ISBLANK(TEXT(Field_2)), 
                ISPICKVAL(Field_1, "No"), 
                ISPICKVAL(Field_2, "No")
            )
        ), 
        "No", 
        ""
    )
)
Formula field to count any 2 fields have yes selected, then do something Formula field to count any 2 fields have yes selected, then do something Reviewed by dasfrogpractice on 07:18 Rating: 5

No comments:

Theme images by mariusFM77. Powered by Blogger.
Youtube Channel Image
Dasfrog Subscribe To watch more Salesforce Training
Subscribe