# Conditional Format with Max Function.

#### omairhe

##### Well-known Member
Hello all,

How do I set the Max value taken from a range comprising of just two cells. I noticed that I cannot use relative references with conditional formatting. Hence, is there a way to set the range to the cell where conditional formatting resides and the other one just at adjacent to it on the right.

for instance, CF resides at B1 and B1 has a value 10, and then the adjacent cell C1 has a value of 15. So, I have my two cells B1 and C1 and the formula must output 15 to be used for the conditional formatting's formula box. then if I copy and paste this conditional formatting to cell B2 the formula should set the range to B2 and C2.

can happen?

Thank you and much appreciation.

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

#### etaf

##### Well-known Member
I have my two cells B1 and C1 and the formula must output 15 to be used for the conditional formatting's formula box.
not sure what this means

Are we talking about conditional formatting cells to change format based on some conditions
Or ?
what happens to the 15

we can use max(B1,c1) to find the max value
B1 = 10
C1 = 15

so the result of MAX(B1,C1) would be 15

Now what do you want to do with that info ?

Book2
ABCDE
1101515
2515
3122525
413813
567967
Sheet1
Cell Formulas
RangeFormula
E1:E5E1=MAX(B1,C1)

Replies
9
Views
137
Replies
1
Views
378
Replies
15
Views
286
Replies
3
Views
209
Replies
5
Views
161

1,186,431
Messages
5,957,797
Members
438,320
Latest member
Thatisfree

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