Apply same format to different cell with different input - excel

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:

Related

Excel: Conditional Format specific cells that match rule

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.

IF-Condition coloring cell

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

How do I override excel conditional formating if one cell contains a value

I currently have a worksheet where column C changes to red if it is due in the next seven days. I would like to have the row change to a different format if I enter ANY date in column E. I have tried a bunch of different ways but I can only get the E cells to change or the entire worksheet and it seems to ignore the E entry.
Here is a link to the file:
http://mpereaseportfolio.weebly.com/uploads/2/5/6/2/25627115/summer_assingment_schedule.xlsx
Try this:
Select the whole range of data except headers, i.e. A2:H193
Now apply a new condition in conditional formatting using the formula
=$E2<>""
Select required format
Make sure that condition is at the top and tick "Stop if TRUE" so that other conditions are not applied
Note that you need exactly that formula including the $
Note also that the formula always refers to the first row of data but will work for the whole range
Please try a formula rule such as:
=(IFERROR(FIND(" AM",$E2),FIND(" PM",$E2))>0)
with applies to =$A$2:$H$200 or similar

Copying conditional Formatting in Excel

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.

Excel integer to boolean condition

Creating a spreadsheet that has a bunch of test cases and at the end says pass or fail.
all values right now are either "Pass" or "fail". I need to be able to have a conditional where I can type in like a number. if it is above 5 i need it to return a pass. if it is below 5 i need it to return a false. any solutions guys?
The following might be the way to go:
where you enter a value in B1, which is then used to condition on. It's usually easier and more transparent to have a column that contains the conditioned value that is separate from the original data.
Another option might be conditional formatting. In this case, you condition on the value in a cell. Here I've formatted the cells to display a green/yellow/red dot (traffic sign) depending on the value in the cell.:
with the output resembling
Another option is to change the formatting of the cell to a specific "Custom" formatting:
Read more about how to Create a custom number format on Microsoft's help page.
A final option (that is a bit more intricate) requires you to set multiple, mutually exclusive, conditional formatting of the cells as well as separate "Custom" cell formatting:
Note that the cell entry A4 has a value of 16, while the display is actually "Pass" (since it's greater than 8 (cell B1). The steps for obtaining this include:
Create a conditional formatting using the "Use a formula to determine which cells to format" option.
Specify the "Format values where this formula is true" as depicted above (removing the dollar signs inserted around A4 by default), while setting the format using "Custom":
Do the same for the other (mutually exclusive) condition by creating a new rule for the same cell ("Format values where this formula is true:" =A4<=$B$1 and setting the "Custom" format to "Fail").
Once both conditional formatting rules are set, change the "Applied to" field to fit your range:
=IF(A2>5,"Pass","Fail") Replacing A2 with the appropriate cell reference.

Resources