Cell colour change relative to value

GlynB

New Member
Joined
Mar 17, 2023
Messages
13
Office Version
  1. 365
Platform
  1. Windows
HI All. Newbie here and I have, probably what you guys would consider to be simple, a particular problem which I'm struggling to fix.
The first part is simple, even for me, where I would like the value in cell A1 to be subtracted from the value is cell B1 then the resulting value automatically entered into cell C1. Now this, for me, is where it gets complicated. I would then like the value in C1 to be compared to B1 and if the value in C1 differs by more than 5% of B1, cell C1 turns red. Thanks in advance!
 
yes it can be achieved , with an IF maybe with an OR() / AND() combination in conditional formatting

we can do the existing 5% with the formula that already works

BUT if B = 0 - than what value to flag
but only if the value in column A is greater than 0.
so does not matter if less than zero

use
=IF(B1=0, A1>0,ABS(C1/B1)>0.05)
as the conditional formatting formula

Book2
ABC
11001000
22000-200
3300400100
440045050
550052525
660066060
77001-699
Sheet1
Cell Formulas
RangeFormula
C1:C7C1=B1-A1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C1:C7Expression=IF(B1=0, A1>0,ABS(C1/B1)>0.05)textNO
 
Upvote 0
Solution

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Hi Etaf, That works perfectly. Huge thanks for your help and patience with this.
 
Upvote 0

Forum statistics

Threads
1,215,452
Messages
6,124,915
Members
449,195
Latest member
Stevenciu

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