Conditional Formatting

blovell91

New Member
Joined
May 6, 2020
Messages
2
Office Version
  1. 365
Platform
  1. Windows
Hi All,

I feel my question is rather easy but I'm making a total mess of it so far.

Basically, I want to check the value of Column I, and depending on the text inside the cell, change it's colour (either red, orange or green).

The column will contain either C1, C2, C3, ---- C74.

And for example, C23, C26, C30 and C31 need to be red.

Is there a way to write a formula that will check for multiple values (as mentioned above) and change the colour? Surely I do not need to write 74 individual ones for each reference, but can group all of the red values together, and the orange together etc.

I don't know if i'm using equal to, text contains, or some kind of true or false and struggling to find the answer online.

Any help will be greatly appreciated.

Thanks
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
yes , you should be able to
Why are they red?
And for example, C23, C26, C30 and C31 need to be red.

Is it because the text in the Cell is "C23" etc
OR are you referring to Cell references Column C row 23 ??

you should able to use an OR formula in conditional formatting

Select Column I
$I:$I

Then for RED a red fill

=OR( I1="C23", I1="C26", I1="C30", I1="C31")

Can you give all
the red conditions
the orange conditions
and
the green conditions
for C1 to C74
in case there is also a pattern to the text and colour
 
Upvote 0
yes , you should be able to
Why are they red?
And for example, C23, C26, C30 and C31 need to be red.

Is it because the text in the Cell is "C23" etc
OR are you referring to Cell references Column C row 23 ??

you should able to use an OR formula in conditional formatting

Select Column I
$I:$I

Then for RED a red fill

=OR( I1="C23", I1="C26", I1="C30", I1="C31")

Can you give all
the red conditions
the orange conditions
and
the green conditions
for C1 to C74
in case there is also a pattern to the text and colour

Hello!

Yeah I wish they hadn't started referencing using "C[insert number], it' making things more confusing.

This is checking for the text, not the cell C23 etc.

Ok so the breakdown is as follows

Green
C1 C6 C7 C25 C34 C35 C36 C37 C38 C41 C43 C44 C45 C46 C47 C48 C49 C50 C55 C56 C57 C58 C59 C61 C62 C63 C64 C72

Orange/Amber
C2 C3 C4 C5 C8 C9 C10 C12 C13 C14 C15 C16 C17 C18 C19 C20 C21 C22 C23 C24 C27 C28 C29 C30 C39 C42 C51 C54 C60 C67 C68 C69 C70 C71 C73 C74 C75 C76

Red
C23 C26 C31 C32 C33 C40 C52 C53 C65 C66

Also, when I highlight column I and then click conditional formatting, it is asking the following

1588762997007.png
 
Upvote 0
you could use either a lookup list , so if anything changes you just update the list , using a countif(List for red,I1)>0


for 2007, 2010 , 2013 or 2016 excel version
Conditional Formatting

Highlight applicable range >>

I:I


Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:


=COUNTIF(REF!$A:$A,I1)>0


FormatÖ [Number, Font, Border, Fill] Green
choose the format you would like to apply when the condition is true
OK >> OK

=COUNTIF(REF!$A:$A,I1)>0
=COUNTIF(REF!$B:$B,I1)>0
=COUNTIF(REF!$C:$C,I1)>0


I have added the list onto a sheet named REF

Book5
FGHIJ
1c1
2c4
3c6
4c2
5c7
6c1
7c4
8c6
9c2
10C8
11C9
12C10
13C12
14C33
15C40
16C52
17C53
18c53
19C34
20C35
21C36
22C37
23C8
24C9
25C10
26C12
27c33
28C40
29C52
30C53
Sheet2
Cells with Conditional Formatting
CellConditionCell FormatStop If True
I:IExpression=COUNTIF(REF!$A:$A,I1)>0textNO
I:IExpression=COUNTIF(REF!$B:$B,I1)>0textNO
I:IExpression=COUNTIF(REF!$C:$C,I1)>0textNO



Book5
ABC
1GREENOrangeRED
2C1C2C23
3C6C3C26
4C7C4C31
5C25C5C32
6C34C8C33
7C35C9C40
8C36C10C52
9C37C12C53
10C38C13C65
11C41C14C66
12C43C15
13C44C16
14C45C17
15C46C18
16C47C19
17C48C20
18C49C21
19C50C22
20C55C23
21C56C24
22C57C27
23C58C28
24C59C29
25C61C30
26C62C39
27C63C42
28C64C51
29C72C54
30C60
31C67
32C68
33C69
34C70
35C71
36C73
37C74
38C75
39C76
REF
 
Upvote 0
Slightly different approach that should reduce (but not completely eliminate) the possibility of errors in the reference list (C23 is listed in Red and Orange).
The List.xlsx
CDE
1GreenC11
2OrangeC16
3OrangeC6
4OrangeC18
5Red
6Red
7Red
8Red
9Orange
10Orange
11Orange
12Orange
13Green
14Green
15Green
16Green
17Green
Ref
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E1:E4Expression=INDIRECT("Ref!"&E1)="Red"textNO
E1:E4Expression=INDIRECT("Ref!"&E1)="Orange"textNO
E1:E4Expression=INDIRECT("Ref!"&E1)="Green"textNO
 
Upvote 0

Forum statistics

Threads
1,215,766
Messages
6,126,760
Members
449,336
Latest member
p17tootie

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