Forum Discussion
Oliullah_Siddique
Jun 26, 2022Brass Contributor
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 will show Operating profit |
| Operating loss | (1,000) | (1,000) | If B2 & C2 are negative, formula will show Operating loss |
| Operating profit/(loss) | 1,000 | (1,000) | If B2 positive & C2 negative, formula will show Operating profit/(loss) |
| Operating (loss)/profit | (1,000) | 1,000 | If B2 negative & C2 positive, formula will show Operating (loss)/profit |
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" )
8 Replies
- OliverScheurichGold Contributor
=IF(AND(B2>0,C2>0),"Operating profit",IF(AND(B2<0,C2<0),"Operating loss",IF(AND(B2>0,C2<0),"Operating profit/(loss)",IF(AND(B2<0,C2>0),"Operating (loss)/profit",""))))You can try this formula.
- Oliullah_SiddiqueBrass ContributorThanks a lot OliverScheurich
- LorenzoSilver Contributor
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" )- Oliullah_SiddiqueBrass ContributorThanks a lot Lorenzo
- LorenzoSilver ContributorGlad we could help. To help others who search this site could you click on the Mark as response link at the bottom of one of the options you got please ? Thanks