Conditional Formatting - Change text color based on calculation

jfeagle

New Member
Joined
Oct 16, 2019
Messages
7
I have sales results, that we red/yellow/green based on how close they are to their target goals each month. What is the trick to using conditional formatting so I don't have to update the text color manually every month? I have found the results for based on color coding like what I have in column D but not what I do. So right now it would be the June line we'd be using. And really I'd only need to change it if it's red or green (like under 67% would be red, over 100% would be green). Thanks in advance!

1690479468569.png
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
So right now it would be the June line we'd be using
To know which month to use, I recommend that you write the month in cell E1 exactly as you have written in column N

Try:

Dante Amor
ABCDEFMNOPQ
1GoalActual% to GoalJun.Jul.
2138%lAug.
370%lSep.
447%lOct.
580%lNov.
6Dec.<33%>50%
7Jan.
8Feb.
9Mar.
10Apr.
11May.<61%>92%
12Jun.<67%>100%
Hoja3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E5Expression=D2>SUBSTITUTE(VLOOKUP($E$1,N:Q,4,0),">","")+0textNO
E2:E5Expression=D2<SUBSTITUTE(VLOOKUP($E$1,N:O,2,0),"<","")+0textNO
E2:E5Cell Value<>""""""textNO

The conditional formatting I used is for the text, it will look like this:
1690481874566.png


---------------
Or you can use the format to fill the cell:
Dante Amor
ABCDEFMNOPQ
1GoalActual% to GoalJun.Jul.
2138%Aug.
370%Sep.
447%Oct.
580%Nov.
6Dec.<33%>50%
7Jan.
8Feb.
9Mar.
10Apr.
11May.<61%>92%
12Jun.<67%>100%
Hoja3 (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E5Expression=D2>SUBSTITUTE((VLOOKUP($E$1,N:Q,4,0),">","")+0textNO
E2:E5Expression=D2<SUBSTITUTE((VLOOKUP($E$1,N:O,2,0),"<","")+0textNO


;)
 
Last edited:
Upvote 1
Solution
To know which month to use, I recommend that you write the month in cell E1 exactly as you have written in column N

Try:

Dante Amor
ABCDEFMNOPQ
1GoalActual% to GoalJun.Jul.
2138%lAug.
370%lSep.
447%lOct.
580%lNov.
6Dec.<33%>50%
7Jan.
8Feb.
9Mar.
10Apr.
11May.<61%>92%
12Jun.<67%>100%
Hoja3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E5Expression=D2>SUBSTITUTE(VLOOKUP($E$1,N:Q,4,0),">","")+0textNO
E2:E5Expression=D2<SUBSTITUTE(VLOOKUP($E$1,N:O,2,0),"<","")+0textNO
E2:E5Cell Value<>""""""textNO

The conditional formatting I used is for the text, it will look like this:
View attachment 96091

---------------
Or you can use the format to fill the cell:
Dante Amor
ABCDEFMNOPQ
1GoalActual% to GoalJun.Jul.
2138%Aug.
370%Sep.
447%Oct.
580%Nov.
6Dec.<33%>50%
7Jan.
8Feb.
9Mar.
10Apr.
11May.<61%>92%
12Jun.<67%>100%
Hoja3 (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E5Expression=D2>SUBSTITUTE((VLOOKUP($E$1,N:Q,4,0),">","")+0textNO
E2:E5Expression=D2<SUBSTITUTE((VLOOKUP($E$1,N:O,2,0),"<","")+0textNO


;)
Thank you! I will test this out. I appreciate your quick response. After 2 years I'm quite over doing this manually so hoping this will help.
 
Upvote 0
To know which month to use, I recommend that you write the month in cell E1 exactly as you have written in column N

Try:

Dante Amor
ABCDEFMNOPQ
1GoalActual% to GoalJun.Jul.
2138%lAug.
370%lSep.
447%lOct.
580%lNov.
6Dec.<33%>50%
7Jan.
8Feb.
9Mar.
10Apr.
11May.<61%>92%
12Jun.<67%>100%
Hoja3
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E5Expression=D2>SUBSTITUTE(VLOOKUP($E$1,N:Q,4,0),">","")+0textNO
E2:E5Expression=D2<SUBSTITUTE(VLOOKUP($E$1,N:O,2,0),"<","")+0textNO
E2:E5Cell Value<>""""""textNO

The conditional formatting I used is for the text, it will look like this:
View attachment 96091

---------------
Or you can use the format to fill the cell:
Dante Amor
ABCDEFMNOPQ
1GoalActual% to GoalJun.Jul.
2138%Aug.
370%Sep.
447%Oct.
580%Nov.
6Dec.<33%>50%
7Jan.
8Feb.
9Mar.
10Apr.
11May.<61%>92%
12Jun.<67%>100%
Hoja3 (2)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E2:E5Expression=D2>SUBSTITUTE((VLOOKUP($E$1,N:Q,4,0),">","")+0textNO
E2:E5Expression=D2<SUBSTITUTE((VLOOKUP($E$1,N:O,2,0),"<","")+0textNO


;)
This worked perfectly, thank you so much!!
 
Upvote 0

Forum statistics

Threads
1,223,239
Messages
6,170,947
Members
452,368
Latest member
jayp2104

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