Forum Discussion

Oliullah_Siddique's avatar
Oliullah_Siddique
Brass Contributor
Jun 26, 2022
Solved

Excel Formula

Hello, I need the following formula.  Thanks a lot.   Result  B2   C2  Formula Criteria Operating profit             1,000             1,000 If B2 & C2 are positive, formula wil...
  • Lorenzo's avatar
    Jun 26, 2022

    Hi Oliullah_Siddique 

    Assuming Excel 2019, 2021 or 365 you could do this with https://support.microsoft.com/en-us/office/ifs-function-36329a26-37b2-467c-972b-4a39bd951d45

     

    in A2

    =IFS(
        AND(B2 > 0, C2 > 0), "Operation profit",
        AND(B2 < 0, C2 < 0), "Operation loss",
        AND(B2 > 0, C2 < 0), "Operation profit/(loss)",
        AND(B2 < 0, C2 > 0), "Operation (loss)/profit",
        TRUE, "Other"
    )

Resources