Ok I need help on excel... I have an area BM46 to BM59 on worksheet 2 which i would like to change colour ( red,amber or green) dependant on the value of H43 on the same worksheet. So basically when the number is equal to 100% I want to colour it green and if it is between 90% and 99% then I want to colour it amber and if it is below 90% i want to colour it red.
Well I can do this but when it is formulated the writing that is in H43 is displayed but I want to put different text in the cells and only have the colour change... I am sure it is simple to do but i am not sure how.
Any help would be awesome.
You can apply value-dependent formatting by selecting the cells you want and then going to
Format > Conditional formatting...
and setting the rules there.
Further to Aqua's response...
Use conditional formatting
You will need to set up multiple rules using "Use a formula to determine which cells to format".
Set each rule with a formula to correspond with the appropriate formatting. If the default color was red, you only need 2 rules. Conditional Formatting formulas need to evaluate to a True/False value. Your formulas should look like "=IF($H$43>.99,true)" for the green, "=IF($H$43>=.9,true)" for amber.
Use "Conditional Formatting Rules Manager" (Alt + H + L + R shortcut) to make sure the rules are in the correct order. Set the green rule to be first and make sure to check "Stop If True".
Your conditionally-formatted cells can have any text you want, it's only the accompanying rule formulas that need to reference H43.
Hope that helps...
Related
I hope you are all well.
I have a range of cells A1:A8. They all have either Passed or Failed in them.
What I have been doing is to use conditional formatting and create two rules:
The first one: Highlight in green cells that contain "Passed"
The second one: Highlight in red cells that contain "Failed"
Is there any way I only have to use one formula? Perhaps "AND"?
Thank you in advance
You cannot have two cell formatting on one rule.
Perhaps you can mark the range green or red with normal formatting and only apply one rule.
So for example make all cells red with normal formatting. Then apply conditional formatting for only the first rule. So if it is Passed, it will be green otherwise always red.
I have used one formula to change the font colour if a cell contains the text "complete" & another formula to add a light blue fill to the entire row if the word "odd" appears in a cell which is in a different column to the first formula.
The conditions seem to clash & although I have changed and played with the order of the conditions & checked there is no conflict in the fill/background or the font colour, even when changing the font colour manually again the fill from the second formula returns the font the cell to black although it is set to automatic in the conditional formatting rule with the fill ?
I wonder where i am going wrong as everything suggests the two conditions should work fine together though when the fill is applied the font goes back to black when it should be green ?
Have you any suggestions ?
I found the issue, I needed to press clear on the font section of the formatting on the fill condition and then clear on the fill. Basically as a rule I press clear on anything not required in that condition and this seems to avoid the conflict and run upto 6 rules on the same cell with no problems!
You can combine multiple conditional formats overlapping cells/rows. (Excel's just a little picky that you do it just right!)
Always use New Rule as opposed to using the built-in rules.
Choose Use a formula to determine which cells to format.
For your example question, I populated the cells as shown above. Select cell B4 and set the conditional formatting as above =($B4="complete") . Note that I removed a $ (dynamic vs absolute cell reference) that was automatically filled in, so that I can fill the formatting's formula down.
Highlight entire Row 4 and set the conditional formatting as below. Again, note the modified $.
When it's working properly, copy entire Row 4, select the rows to which the formatting should be applied, and Paste Formatting.
[
Obviously the steps will vary for you depending on your data and what's in the neighboring cells whose formats you may or may not want affected by the formatting and copy/pasting.
Let me know if that works for you.
From my experience with conditional formatting, I believe that it applies a format to the entire cell rather than individually modifying fill or font colour, so formats will not combine. I had a similar situation and solved it by creating an additional rule. In your case, one that applies your desired font colour and background fill to the 'complete' cell if the same row also contains 'odd' using the AND() function.
I have been trying to change the color of certain cells on my WS that fall outside of an acceptable range. The statement I've been trying to use is,
IF(OR('cell'>1.3,'cell'<2.5),'turn red','do nothing')
In english, "If a cell is less than 1.3 or greater than 2.5 turn red, else do nothing." I cannot find a resource that guides me to how I can get the cells to change colors. I also have been unsuccessful in creating a statement in the Conditional Formatting tab that satisfies my goal. I feel this should be simple, but for some reason cannot figure it out. Does anyone know if this is possible, and if so how to do it?
EDIT: Also, I have different ranges based on another cell on the spreadsheet. I need this also taken into consideration
Select the columns that you want to format
Click Conditional format --> new rule
Select "Use a formula to determine which cells to format"
In the formula bar enter the formula =AND(A1>1.3,A1<2.5)
Choose the fill color as red and press OK
am confused with your formula and your english version. If its the other way, then use the formula =OR(A1<1.3,A1>2.5)
I'm currently working in excel, and I'm trying to figure out a way to find if multiple cells contain the string value of another cell, and if it does highlight the cell where the row and column meet up. I created an example of what I want, only it will be on a much larger scale.
I've tried using: =ISNUMBER(SEARCH(substring,text)) but I'm not quite sure how to use it the way I want to.
Any help will be appreciated!
Your approach is correct, we can use the fact that conditional formatting is applied like dragging a formula, adapting relative references.
Create a conditional formatting formula rule:
=ISNUMBER(SEARCH(B$1,$A2))
Applied to B2:D7
Your formula will work nicely; what you'll want to do is put that formula into all the cells you want to highlight, so you get FALSE and TRUE in every cell.
You'll then use two Conditional Formatting rules. The first will look for Cell Value = TRUE, and will set cell background and font colour to yellow. The second will look for Cell Value = FALSE, and will set cell background to No Colour and Font to White.
This will reproduce the result you're looking for.
Edited to add:
It is possible to do this using just Conditional Formatting too, but it's a little more fiddly. If you want to try it, you can do this:
Highlight your range, and take note of which cell is Active - that's the cell within your highlighted range that is still white. It's also the one whose address is shown in the Name box in the upper left. For the sake of this answer, we'll assume that's B2
Create a new Conditional Formatting rule. Choose "Use a formula to determine which cells to format".
Use the formula =ISNUMBER(SEARCH(B$1,$A2). Set the format to colour just the cell background.
Note where the $ appears in the formula above - you want to leave the row number anchored in the first part, and the column letter anchored in the second part.
This takes advantage of the fact that Conditional Formatting is able to use absolute, relative, and mixed references to find which cells to format. It's also a tidier solution, but it can be harder to maintain if the sheet is ever repurposed or modified.
I am trying to change the color of a cell's background to red if the cell's value is not between 0.0086 and 0.0094, and also not blank. I have successfully covered the part less than 0.0086, but the other two conditions keep giving me errors. Below is my code thus far
=(($D$2:$D$1000) < 0.0086) AND (($D$2:$D$1000) > 0.0096) AND NOT(ISBLANK(($D$2:$D$1000)))
Please try a Conditional Formatting formula rule of:
=OR(D1<0.0086,D1>0.0094,D1="")
applied to $D$1:$D$1000.
(What you want rather than what you don't want may be conceptually easier.)
Based on body of question rather than Title.
Edit to exclude blank cells from highlighting:
=AND(OR(D1<0.0086,D1>0.0094),D1<>"")
The way I got it to work is as follows:
Under Home, Styles, Conditional Formatting, Highlight Cell Rules, then Greater Than, and enter your desired value (.0094), specify that to be red fill
Under Home, Styles, Conditional Formatting, Highlight Cell Rules, then Less Than, and enter your desired value (.0086), specify that to be red fill
Under Home, Styles, Conditional Formatting, Highlight Cell Rules, then New Rule, then new rule, format cells that contain..., blanks, and specify that to be no fill (or white fill)
I believe pnuts answer would be more efficient for the computer to process, however.