Building a logic for multiple conditions

zinah

Active Member
Joined
Nov 28, 2018
Messages
353
Office Version
  1. 365
Platform
  1. Windows
I need to build logic for below statement:

If 2018 Favorability % is greater than 2017 Favorability %, and if 2018 Favorability % is greater than or equal to 70% and if the difference of Favorability percentages 0f 2018-2017 is greater than or equal to 10%, then “positive”, other than that “negative”. And if the difference of 2018 & 2017 percentages is less than 10% then “ignore”.

Below is a sample table of my scenario and I tried to justify why the reason of each outcome. Can you help with building the right logic/formula?





2017 Fav 2018 Fav Diff. Outcome Justification
80% 65% -15% Bad
45% 55% 10% Ignore
70% 85% 15% Good more than 70% and Diff is more than 10%
49% 53% 4% Ignore
65% 59% -6% Ignore
50% 60% 10% Ignore
55% 75% 20% Good more than 70% and Diff is more than 10%
70% 75% 5% Good more than 70%
50% 69% 19% Good more than 10% improvement and almost 70%
80% 79% -1% Good more than 70% improvement
79% 80% 1% Good more than 70% improvement
20% 49% 29% Bad yes, it's good improvement but it's less than 70%
47% 59% 12% Ignore
83% 80% -3% Good more than 70% improvement
74% 70% -4% Good 70% is good
74% 69% -5% Ignore
80% 70% -10% Ignore
85% 70% -15% Ignore
65% 70% 5% Good increased
64% 69% 5% Ignore
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
Hi,

Can anyone help please?
I'm not sure how can I paste the table, as I tried to paste and couldn't and I don't know how to insert the table as picture.

Thanks
 
Upvote 0
Your "logic" doesn't match the results you have provided, so you will need to provide more detail.

Here is one possible formula that replicates your "Good" results. I have used 69% as the boundary, because this is
"close" to 70%.

E2: =IF(AND(B2>=69%,C2>-5%),"Good","")

I don't know how you differentiate between "Ignore" and "Bad"?


Book1
ABCDE
12017 Fav2018 FavDiffYour outcomeMy outcome
280%65%-15%Bad
345%55%10%Ignore
470%85%15%GoodGood
549%53%4%Ignore
665%59%-6%Ignore
750%60%10%Ignore
855%75%20%GoodGood
970%75%5%GoodGood
1050%69%19%GoodGood
1180%79%-1%GoodGood
1279%80%1%GoodGood
1320%49%29%Bad
1447%59%12%Ignore
1583%80%-3%GoodGood
1674%70%-4%GoodGood
1774%69%-5%Ignore
1880%70%-10%Ignore
1985%70%-15%Ignore
2065%70%5%GoodGood
2164%69%5%IgnoreGood
Sheet1
 
Last edited:
Upvote 0
Thank you Stephen for your update. Here's what my logic is:

If 2018 Fav >2017 Fav, and If 2018 Fav is >= 70% and if Diff is >= 10%, then it's Good, otherwise Bad, and if Diff<10% & >0% and 2018 Fav < 70% then Ignore.
For Ignore situation: if 2017 Fav = 49% and 2017 Fav = 55% then Ignore
If 2017 Fav = 55% and 2018 Fav = 65% then Ignore (as the % is less than 70%)

Hope I clarified my logic. Can you help?
 
Upvote 0
If 2018 Fav >2017 Fav, and If 2018 Fav is >= 70% and if Diff is >= 10%, then it's Good, otherwise Bad, and if Diff<10% & >0% and 2018 Fav < 70% then Ignore.

This logic gives:

E2: =IF(AND(B2>=70%,C2>=10%),"Good",IF(AND(C2<10%,C2>0,B2<70%),"Ignore","Bad"))


Book1
ABCDE
12017 Fav2018 FavDiffYour outcomeMy outcome
280%65%-15%BadBad
345%55%10%IgnoreBad
470%85%15%GoodGood
549%53%4%IgnoreIgnore
665%59%-6%IgnoreBad
750%60%10%IgnoreBad
855%75%20%GoodGood
970%75%5%GoodBad
1050%69%19%GoodBad
1180%79%-1%GoodBad
1279%80%1%GoodBad
1320%49%29%BadBad
1447%59%12%IgnoreBad
1583%80%-3%GoodBad
1674%70%-4%GoodBad
1774%69%-5%IgnoreBad
1880%70%-10%IgnoreBad
1985%70%-15%IgnoreBad
2065%70%5%GoodBad
2164%69%5%IgnoreIgnore
Sheet1
 
Last edited:
Upvote 0
Thank you Stephen, you gave me an insight to build the logic:

=IF(AND(B2>A2,B2>=70%),"Good",IF(AND(B2<a2,b2>70%),"Good",IF(AND(B2>A2,B2>=69%,C2>=15%),"Good",IF(AND(B2<70%,C2>10%),"Ignore",IF(AND(B2<a2,b2=69%,c2<=5%),"ignore",if(and(b2<a2,b2<70%,c2<0),"bad",if(and(b2<a2,b2<70%),"bad",if(and(c2<10%,c2<0),"bad","ignore"))))))))< html=""></a2,b2=69%,c2<=5%),"ignore",if(and(b2<a2,b2<70%,c2<0),"bad",if(and(b2<a2,b2<70%),"bad",if(and(c2<10%,c2<0),"bad","ignore"))))))))<></a2,b2>
 
Last edited:
Upvote 0
Great! Well done for figuring it out.

Your formula is getting truncated because ">' characters are sometimes interpreted as HTML.

Put a space before and after: " > " and you'll be able to post your complete formula.
 
Upvote 0
Thank you so much Stephen!

here's the formula:

IF(AND(B12 > A12,B12 >= 70%),"Good",IF(AND(B12 < A12,B12 > 70%),"Good",IF(AND(B12 > A12,B12 >= 69%,C1 2 >= 15%),"Good",IF(AND(B12 < 70%,C12 > 10%),"Ignore",IF(AND(B12 < A12,B12=69%,C12 <= 5%),"Ignore",IF(AND(B12 < A12,B12 < 70%,C12 < 0),"Bad",IF(AND(B12 < A12,B12 < 70%),"Bad",IF(AND(C12 < 10%,C12 < 0),"Bad","Ignore"))))))))
 
Upvote 0
Thanks for posting your formula. However, this is not consistent with what you've said in previous posts, and there are some redundancies and boundary gaps in the formula itself, e.g. if 2017 Fav and 2018 Fav are both 100%, your formula returns "Bad".

I am guessing that what you're looking for is as simple as:

Good:
2018 Fav >=70%
or
2018 Fav >=69% and Increase >=15%

Ignore:
Increase >10%
or
2018 Fav >=69% and Increase >=5%

Bad:
Everything else

In which case:

D2: =IF(OR(B2>=70%,AND(B2>=69%,C2>=15%)),"Good",IF(OR(C2>10%,AND(B2>=69%,C2>5%)),"Ignore","Bad"))


Book1
ABCDE
12017 Fav2018 FavDiffOutcomeReason
260%70%10%Good2018 Fav >=70%
370%70%0%Good2018 Fav >=70%
480%70%-10%Good2018 Fav >=70%
590%70%-20%Good2018 Fav >=70%
6100%70%-30%Good2018 Fav >=70%
7
854%69%15%GoodDiff >= 15%
955%69%14%IgnoreDiff > 5%
1063%69%6%IgnoreDiff > 5%
1164%69%5%BadDiff<= 5%
1270%69%-1%BadDiff <= 5%
13
1457%68%11%IgnoreDiff > 10%
1558%68%10%BadDiff <= 10%
1659%68%9%BadDiff <= 10%
1770%68%-2%BadDiff <= 10%
18
1910%60%50%IgnoreDiff > 10%
2049%60%11%IgnoreDiff > 10%
2150%60%10%BadDiff <= 10%
Sheet1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,320
Members
448,887
Latest member
AirOliver

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