max and conditional formatting

zrx1200

Well-known Member
Joined
Apr 14, 2010
Messages
622
Office Version
  1. 2019
Platform
  1. Windows
e8 = 7.8
e10 =5.5
e6 = 6.3

answer to be in cell e12

conditional formatting formula =e12=max(e8,e10)-e6

I've tried all combinations of locks on rows and columns.

It does nothing, I don't understand why?

2019 office
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
I'm not sure what you mean by "answer"? The answer to what?

Here's E12 conditionally formatted to yellow fill if E12=MAX(E8,E10)-E6.

ABCDE
1
2
3
4
5
66.3
7
87.8
9
105.5
11
121.5
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E12Expression=E12=MAX(E8,E10)-E6textNO


I don't know whether you may have minor rounding discrepancies, e.g. if my E6 displays as 6.3, but is really 6.2999999, the E12 conditional format condition will not be true. I would need to round to the precision required.
 
Upvote 0
I'm not sure what you mean by "answer"? The answer to what?

Here's E12 conditionally formatted to yellow fill if E12=MAX(E8,E10)-E6.

ABCDE
1
2
3
4
5
66.3
7
87.8
9
105.5
11
121.5
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
E12Expression=E12=MAX(E8,E10)-E6textNO


I don't know whether you may have minor rounding discrepancies, e.g. if my E6 displays as 6.3, but is really 6.2999999, the E12 conditional format condition will not be true. I would need to round to the precision required.
SO, in case outlined above, I can get fill color only not with 1.5 the "answer" using this formula below.
=E12+MAX(E8,E10)-E6

Your formula yields nothing. No fill or answer number?

All cells are formatted to Number one decimal.

I don't get this?
 
Upvote 0
Sorry, I still don't understand what you are trying to do.

1. What formula, or what value, do you have in cell E12? You haven't told us this yet.

2. When do you want cell E12 to be conditionally formatted?
 
Upvote 0
Sorry thought I was clear in #1, never the less let me clarify.

Cell E6 will have value of 6.3
Cell E8 will have value of 7.8
Cell E10 will have value of 5.5
Cell E12 will get its value from the conditional formatting formula, which is suppose to be =E12=Max(E8,E10)-E6 equaling 1.5 display in cell E12

Does the scope now make sense?

Thanks for your time thus far!
 
Upvote 0
Just to clarify -
- Conditional Formatting only changes the formatting on cells. It cannot/does not return values to a cell.
- Formulas in a cell will return values, but not formatting

So it sounds like maybe you want both of these things?
If that is the case, you would place your formula in cell E12, and add any Conditional Formatting that you want to that cell separately (though I am not sure it makes sense to have the same formula in both cells, as then the Conditonal Formatting would always be applied, kind of defeating the purpose).
 
Upvote 0
Solution
Just to clarify -
- Conditional Formatting only changes the formatting on cells. It cannot/does not return values to a cell.
- Formulas in a cell will return values, but not formatting

So it sounds like maybe you want both of these things?
If that is the case, you would place your formula in cell E12, and add any Conditional Formatting that you want to that cell separately (though I am not sure it makes sense to have the same formula in both cells, as then the Conditonal Formatting would always be applied, kind of defeating the purpose).
Thanks Joe4,

You help solve the the issue!

- Conditional Formatting only changes the formatting on cells. It cannot/does not return values to a cell. Key!

Also, I noticed in my vba code I was clearing cell E12 which was taking away the formula so I omitted that cell from clear contents in the vba procedure.

Thanks to Stephen and Joe.
 
Upvote 0
You are welcome.
Glad we were able to help you figure it out.
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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