Forum Discussion
Trying to fill a field in excel with 3 different wordfs based on another field result
I am trying to fill a field in excel with 3 different words based on another fiels results.
Result field will have a percentage based on a calculation which is already set to show 3 differnt colors based on the reults.
ie: 0-32% is red, 33-74% is Yelow and 75-10% is Green, ths field is G7
I want to have the result of G7 to fill G8 with the the following statement, and include the color fill above.
If G7 is 0-32% then "Bad Deal", if G7 is 33-74% then "Fair Deal", if G7 is 75-100% then "Good Deal"
Looking to the Deal words placed in the field based on the result of G7
3 Replies
- Olufemi7Iron Contributor
Hello Brian128,
Step 1. In cell G8, enter one of these formulas:
=IF(G7<=32%,"Bad Deal",IF(G7<=74%,"Fair Deal","Good Deal"))or =IFS(G7<=32%,"Bad Deal",G7<=74%,"Fair Deal",G7>=75%,"Good Deal")
This will display:- 0–32% → Bad Deal
- 33–74% → Fair Deal
- 75–100% → Good Deal
Step 2. Apply conditional formatting to G8 based on G7:
Red: =G7<=32% Yellow: =AND(G7>32%,G7<=74%) Green: =G7>=75%Step 3. Test it:
- If G7 = 25% → G8 shows Bad Deal in red
- If G7 = 50% → G8 shows Fair Deal in yellow
- If G7 = 80% → G8 shows Good Deal in green
- SergeiBaklanDiamond Contributor
Other variants
=LOOKUP(G7, {0, 0.33, 0.75}, {"Bad", "Fair", "Good"} ) & " Deal"=IF( G7 >= 0.75, "Good Deal", IF(G7 >= 0.33, "Fair Deal", "Bad Deal") )=SWITCH( TRUE, G7 >=0.75, "Good Deal", G7 >=0.33, "Fair Deal", G7 >=0, "Bad Deal" ) - mathetesGold Contributor
You need to become acquainted with the IFS function. It should be very straight forward. Depending, though, on the degree of precision, you may need to do some finagling to get 32.5% (for example) to display the right words and color.
Or go at it backwards: IFS stops at the first successful match, so you could write it:
=IFS(G7>.75,"Good Deal",G7>.33,"Fair Deal",G7>0,"Bad Deal")