Need help with Conditional formatting Rule
In the example below, I only want to highlight the specific cell that passes the rule - E1 > 100% So, only E3 needs to be highlighted in Red. With the current rule, it is highlighting every cell from E4 thru E13. I only want E3 to highlight because E3 passed the criteria. And similarly for other matching E cells.
I have modified the formula per "UrDearBoy" and this is how it looks now and it works!
You need to amend rule to ignore text values so change your formula to:
=AND(ISNUMBER(E1),E1>100%)
FYI - Conditional formatting can be processor heavy so I would consider limiting the Applies To range to the relevant range rather running this check on all ~1MIL rows
I was able to set up a rule with these properties by using "Conditional Formatting > Highlight Cell Rules > Greater Than" and then set the value to 1 as in the below screenshots.
If you want to go with a simple formula based solution, you can use:
=N(E1)>100%
The N() function converts text to 0 and numbers to their numerical value.
Related
I tried selecting the entire range (e.g. A2 to Z400), then put in the condition for instance: =B2<A2 to hope that a "ranged" conditional format would apply, but it doesn't seem to be the case.
I can probably come up with a VBA solution, but I was hoping to have an built-in Excel method if possible
Utilize conditional formating is indeed possible.
Select the desired range.
Select Conditional Formatting.
New Rule..
Use a forumla to determine which cells to format.
For the formula, enter
=IF(B1<A1;1;0)
Also, choose how you which to format.
This checks wheter B1 is smaller than A1. If true, it would return 1 which is boolean for true. This logical test should solve your issue. See screenshot below for the rule applied to range A1:B5.
Rule applied to range A1:B5 EXAMPLE
I would like to know, if possible, how can the following be done: I have two cells with different inputs that change depending on filters.
Example:
A1 = 5
A2 = 7
A1 has a dynamic format that changes depending on its value.
The value of A2 also changes, however I would like to have the same cell color and font as A1 despite not having the same number.
Copy formatting is not an option as it is static.
Apply same formatting rules does not do the work as it has different values.
Maybe a macro that copies format of A1 to A2 every time change in value happens.
thanks in advance,
Kylian
You can apply the same conditional formatting to multiple cells:
To create a new rule:
1) Highlight A1:A2
2) Add a new rule with the following formula:
$A$1=5
(I assumed 5 is the value that triggers the rule)
To expand an existing rule, go to Conditional Formatting and edit the formula so it uses absolute referencing (i.e. add $ in front of the column and row: $A$1 instead of A1, then edit the range the rule applies to:
I'd like to compare 2 cells (A1 and A2 - both formatted hh:mm) and color one cell, A3, depending on the result of the comparison of A1 and A2.
A1: Hours per day to work: 8
A2: Hours worked: 8
Pseudo Statement
IF (
A1 = A2,
"",
IF (
A1 > A2,
COLOR_CELL( A3 ),
IF (
A1 < A2,
COLOR_CELL( A3 )
)
)
)
I researched but I only found that you can use conditional formatting. This doesn't seem to help me ... is this possible?
You wrote that you could not use conditional formatting because I can't multiple events on one cell using conditional formatting. Note in the screenshot that we have multiple rules applying to cell A3, which is colored according to those rules:
Conditional Formatting is exactly the thing you're looking for to do this, outside of that you can use VBA to change the colour of the cells, but that's really long and clunky and needs to be set away unlike conditional formatting which works on the fly
There's no 'only in cell' function that can change the colour of the cell
I know you said no conditional formatting but it really is the thing you want to use, and it works across excel, google sheets and other things
Highlight area you want to use
Home -> Conditional Formatting -> Create new rule
Use a formula to determine which cells to format
=$H9<$I9 note that this is an example, you want the $H to be the row that the allocated time is, the $I to be the actual time, and then both 9s are replaced by the top row that you want to effect
also note that you appear to have the columns downwards so adjust accordingly to where they need to go (without seeing the sheet and how it fits together I cant give you the exact formula to use
set the format to what ever you want
click ok
select add rule
repeat process but change the < to > this time and set the formatting accordingly and click ok
Set the Applies to to the range of cells you want to have the highlight on it
click the ok
hey presto, done
Ste
I use conditional formatting to format a cell depending on the values of another cell. This is the rule:
Cell Value not between =$BV$10*0,5 and =$BV$10*0,5
This rule is saved on Cell Y10
(Explanation: If the Value in Y10 is inbetween 0,5...1,5 * BV10 apply the formatting)
I want to use this rule on many different Cells but the formula should adjust automaticly, just like in a "normal" formula.
When I copy the format using the Format Painter the formula is copied without any changes. But I need the row to be changed. For example, when copying to Y11 the formula should be changed to :
=$BV$11*0,5
Is there any way to achieve this or to change $BV$10 into $[this column+83]$[this row] or something like that?
Yes. $ is used to lock the cell reference.
So to get what you need just change your formula to this unlocking the rows:
=$BV10*0,5 and =$BV10*1 ~~> I change the limits to actually test the formula
So if you want your column to move as well, then remove the other $ sign.
Also, you can explicitly apply this formatting to other cells by supplying the range in Applies To argument like below:
Take note that you can actually put the formatting in any cell.
But the effect will always be on the Range you explicitly define in Applies to.
I discourage using the Copy Paste Format as this sometimes overlaps formattings you've done.
To apply the formatting to a group of different range, just separate the ranges with a , comma like what you see below:
So the formatting will then be applied to $Z$10:$Z$20 as well.
It is the same as $Y$10:$Z$20, but I just want to point out that it can be used to none contingous range.
And since your column is locked with your formatting, it will still be references to $BV(x) where x is the corresponding row in Y and Z.
I have a condition set up =IF(C2<42,C4="") the background color will turn red if met.
When dragging the crosshair (at the bottom left of the cell) to neighbouring cells, the formula stays the same.
I need the formula to then change to =IF(D2<42,D4="") and so on 300+ times, Is there any way to refer to the current column i.e =IF(thiscolumn-row2 < 42, thiscolum-row4 = "")
Excel sometimes by default puts dollar signs in front of the cell/row labels
(ie $C$4 instead of C4 .... the dollar signs tell excel not to change the formula with each row but to lock in the original values. Does your rule in conditional formatting show dollar signs? That may be your problem. Get rid of the dollar signs and what you need should work.
You don't use If in Conditional Formatting formulas. The formula itself defines the condition that you are looking for, so the if is already implied. So your formula should simply be something like:
=C2<42
I'm confused about the 2nd part of your formula, C4="". Is that supposed to be a 2nd condition? If so, use an AND statement:
=AND(C2<42,C4="")
If you are using Excel 2007 or 2010 another source of potential confusion is that references don't change in the Conditional Formatting formula box when you drag them around, even if they are relative.
Assuming you want to apply formatting to the range c1:d300, select that range of cells, bring up the conditional formatting box and enter:
=AND(C2<42,C4="")
Now it will apply the formatting with relative references to the full selected range.