Subtracting negative and positive numbers using multiple conditions in an Excel formula

Deeweb1

New Member
Joined
Apr 15, 2019
Messages
1
Hi,

I am evaluation a spreadsheet and need create a formula that will evaluate 4 different scenarios...

First based on if a text of 2 cells are Favorable or Unfavorable, then add or subtract based on the cell text.

So.. this is what I am trying to achieve in 1 formula

If D5="Favorable" and L5="Favorable", then add D6+L6
If D5="Unfavorable" and L5="Unfavorable", then add D6+L6
If D5="Favorable" and L5="Unfavorable", then subtract D6-L6
If D5="Unfavorable" and L5="Favorable, then subtract L6-D6

Thank you so much for your help
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".
UNTESTED.....and willl show blank if either cell is blank
Code:
=IF(OR(D5="",L5=""),"",IF(AND(D5="Favorable",L5="Favorable"),D6+L6,IF(AND(D5="Unfavorable",L5="Unfavorable"),D6+L6,D6-L6)))
 
Upvote 0

Forum statistics

Threads
1,224,921
Messages
6,181,771
Members
453,065
Latest member
jfrsanders

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top