# Conditional Formatting and IF

#### djl0525

##### Well-known Member
On row 6, I enter a bunch of letters. I need C6 to change color with conditional formatting if two conditions are met.

C6 contains a T
and E6:G6 contain an A

Can somebody help me get started with this, please?

Thanks -- DJ

### Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.

#### T. Valko

##### Well-known Member
On row 6, I enter a bunch of letters. I need C6 to change color with conditional formatting if two conditions are met.

C6 contains a T
and E6:G6 contain an A

Can somebody help me get started with this, please?

Thanks -- DJ
Ok, does that mean EVERY cell in E6:G6 has to contain an "A"?

What version of Excel are you using?

#### country101

##### Board Regular
You will use the AND function in your conditional formatting. I dont know exactly what you are wanting it to do, but you would make the and statement have at least two arguements that are true. Such as a cell(a6) has a 6 in it and your statements could be AND(A6>1,A6<200). Both statements are true, so whatever format you select would work.

#### djl0525

##### Well-known Member
Thank you both.

I'm using Excel 2007 and I want the T in column C to stand out if any cell from E6:G6 contains the single letter A.

DJ

#### T. Valko

##### Well-known Member
Thank you both.

I'm using Excel 2007 and I want the T in column C to stand out if any cell from E6:G6 contains the single letter A.

DJ
Try this...

Select cell C6

Goto the Home tab>Styles>Conditional Formatting>Manage rules>New rule>Use a formula to determine which cells to format

Enter this formula in the box below:

=AND(C6="T",OR(E6:G6="A"))

Click the Format button
Select the desired style(s)
OK out

#### country101

##### Board Regular
Once I get to a computer that isnt using this stupid 2010 version of excel, I will see about working out a formula for you. I cant figure out how to do anything with this newer version.

To clarify, you want c6 to have some kind of formatting if any of e6:g6 contain an A regardless of what the other cells have? IE e6=5 f6=A g6=asdfgasdg would mean that c6 would get formatted and the same if any or all of them had an A

#### djl0525

##### Well-known Member
Thank you country101 and T. Valko.

I used =AND(C6="T",OR(E6:G6="A")). It does exactly what I need.

Thanks again!
--DJ

#### T. Valko

##### Well-known Member
Thank you country101 and T. Valko.

I used =AND(C6="T",OR(E6:G6="A")). It does exactly what I need.

Thanks again!
--DJ
You're welcome. Thanks for the feedback!

Replies
1
Views
244
Replies
6
Views
333
Replies
1
Views
86
Replies
3
Views
173
Replies
3
Views
301

1,195,582
Messages
6,010,581
Members
441,557
Latest member
Jbest23

### 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.

### Which adblocker are you using?

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

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