I am currently applying conditional formatting to a table.
I have a rule that states if a certain cell in column B contains a course that begins "B6", then excel needs to color the adjacent cell in column C, blue.
The thing is, the column that would contain B6 changes depending every semester since the courses also change. So for example, a course that starts with "B6" in cell B5 may very well change to a course that starts with "B80" in the future.
That said, to combat potential changes I am going one by and adding conditional formatting formulas for each row/cell.
Here is an example:
Conditional Format Formula - Here you can see that if cell B4 contains "B6" it should format accordingly -- at this time it does not have "B6" so it's blank. On the other hand, B5 contains "B6" so it should format accordingly -- which it does in this case.
Formatting Outcome on the Sheet - this is what it looks like on the sheet.
My Question
So as you can see I am going one by one and applying the conditional formatting to each cell one by one. I have to apply the color blue if each cell contains "B6", and the color orange if each cell contains "B80" and so forth. Is there anyway I can make a formula so that I only have to make one rule per color for each column instead of conditionally formatting each cell?
EDIT:
Update with relative referencing - I followed your link and it didn't seem to work.
Related
Table Context:
I currently have an excel sheet that looks like this:
.
The sheet is full of formulas that pull relevant course information from another tab.
Moreover, I have set conditional formatting rules so that each course number (B8XXX) is given its respective color. You can see an example of that here:
My Question:
I am trying to set a conditional formatting rule such that the adjacent cells that display "OPEN" correspond to the length of a class by removing the text "OPEN" and applying the same color as the course.
To be more clear, here's an example:
^ Here the class length is 1.30 hrs, but the cell doesn't span over to the 10:30 time slot in cell C3.
I want to apply a conditional formatting such that cell C5 reads the "Class Length: 1.30 hrs" in cell B5 and removes the "OPEN" text, and applies the same color format in cell B5 to cell C5. So, cell B5 AND cell C5 are the same color blue.
But I also want the conditional formatting to read the class length for classes that span 3.15 hrs, so that it spans across 10:30-12:15. So, (below) , the orange formatting should be applied to cell C11, D11, and E11.
EDIT: Course Information
The course information is pulled from another table below it, which is pulled from a tab that has filtered a bunch of data.
Conditionally formatted table:
Table below it:
The tab where the information is coming from is:
Master and Step Chart
Hello, I'm using A4-E4 as a "Master" code, and incrementally using A5-A8 to replace A4, B5-B8 to replace B4, etc etc first replacing one number of the "master", then two different numbers, etc until I have basically every combination. At some point the same number as the "master" is going to be generated. I have the numbers separated into groups of 16 on individually sheets for a total of 64 sheets. Obviously at some point the same number "43254" is going to generate on one of the sheets. Is there a way to search/highlight that number automatically upon generation? I've found that I can do conditional formatting to search for a specific cell, but not a range of cells. Like compare "A4-E4" to every set of five adjacent numbers in all the sheets, then highlight it. I have no idea if this is possible, but I'd appreciate it.
Select cells A4 through E4 and go to Format -> Conditional Formatting -> Manage. Apply style Good if Formula is:
CONCATENATE($A4;$B4;$C4;$D4;$E4)="43254"
So 43254 matches.
And 43253 does not match.
This is more complex than first appears. The following explanation may be difficult to understand if you do not have much experience with conditional formatting.
The formula gets evaluated 5 times, once for each of the cells.
Normally, rather than always indicating cell A4, Calc would interpret A4 as the currently evaluated cell (because we selected cells starting from A4). And B4 would indicate the cell to the right of the current cell that is evaulated. So for example, if such a conditional formatting formula were filled to cell D7, then A4 would actually indicate cell D7, and B4 would indicate cell E7.
However, our formula uses $A4 instead. The $ tells Calc that we always want column A even if the formatting is for column B or C et cetera.
One outcome of this is that the formula can be filled down or up but not left or right. If it is filled down one row for example, $A4 refers to column A but the current row, which would be cell A5.
I have a schedule with team member names and the column headers are half hour time intervals. I want to shade the cells of hours each person does not work with gray according to their shift schedule, so that I know not to schedule that person during that hour.
I have created a separate table with each person's shift schedule, and the names appear in the same order as in the schedule.
Is there any way to conditionally format the cells at once? There has to be an easier way then what I am doing now...which is one by one clicking on each person's cell and creating the formatting formula.
I can't copy paste the formatting because the formula still refers to the previous person's shift on the other table. I need it to refer to the next row.
The formula I use for conditional formatting is:
='Job Functions'!$O$5>$C$9
Where Job Functions is the sheet that contains the shifts, O5 is the shift assigned to that employee, and C9 is the column header on the schedule (6:30am). I just clicked on the cell and created a new conditional formatting rule from the excel ribbon on top...no vba.
If there is a VBAsolution to this that'd be great! I'm fairly new to VBA
Conditional formatting works like this
Let's say I have an array of numbers in A2:E5 and a header row in A1:E1. I want to have my array of number be green if the value of the cell is greater than it's column header. That is to say I want to compare A2>A1, B5>B1, D4>D1, etc. this means I want the header row comparison to be constant.
In Excel formulas you use the $ symbol to maintain constant references. Since I want the row to stay constant but I want the column to be relative to the cell in my array of numbers my header reference will be A$1 (column is relative, row is locked).
This is just the formula used to determine if formatting will be applied or not. If it returns true then the conditional formatting is applied, if it returns false then nothing happens.
However, where the formatting is applied is determined by the Applies to reference. In my example below I am applying the formula A$1<A2 to $A$2:$E$5. This means that in the cell A2 the formula A$1<A2 is used to determine if formatting is applied, but in B3 the formula B$1<B3 is applied. This is the same logic as if you were to have dragged the formula itself into these cells.
If instead my Applies to formula were $B$2:$E$5 this means that B2 would be colored green if A$1<A2, and B3 would be colored green if A$1<A3.
So with all that your formula should probably be
='Job Functions'!O5>C$9
drag and drop it down to fill the other cells
I have several columns where the data from rows 7 onwards changes depending on the selection made from a dropdown menu in row 6. Most of these options will result in textual or number based values appearing, but two of them would need to be formatted as currency.
Essentially what I want is a conditional formatting formula that says; if row six in any column has a value of “Implied Unit Rate” or “Annual budget”, format rows 7 and onwards in that column as currency.
I can get this to work by creating two separate conditional formatting formulas and applying them both to the whole area, but it seems like there should be a way to do it in a single formula.
My current formulas, applied as two separate rules:
=INDIRECT(ADDRESS(6,COLUMN(),1))="Annual Budget"
=INDIRECT(ADDRESS(6,COLUMN(),1))="Implied Unit Rate"
How I think it should work when applied as one rule:
=OR(INDIRECT(ADDRESS(6,COLUMN(),1))="Annual Budget",
INDIRECT(ADDRESS(6,COLUMN(),1))="Implied Unit Rate")
When I enter the combined formula in a regular cell within the worksheet, it does return true as expected, but does nothing when I apply it as a conditional formatting rule. Any ideas? Thanks in advance!
Now I may be mis interpreting what Scott is saying, so I am going to say this in my own words.
Your condition check on the cell address in question is a little "verbose". In order to apply your conditional formatting, select the range you want to apply your condition formatting to first. Lets arbitrarily say select range A7 to D42. After selecting the appropriate range, ensure cell A7 is the active cell of the selected range. This usually means there is a border around A7 to D42 and all cells but A7 have been slightly greyed to indicate that they have been selected, and A7 will have a brighter background to indicate that it is the active cell. With all that still in effect, select your conditional formatting.
In conditional formatting choose formula as the option (last one at the bottom) to control how your formatting will be applied. In the region where you can enter your formula, enter the following:
=OR(A$6="Annual Budget", A$6="Implied Unit Rate")
The $ will keep the row and column reference from changing as it is applied to each cell in the range. It will always be checking row 6 of what ever column the cell is in. The column A reference is relative to the active cell.
I'm trying to apply conditional formatting in Excel on a range of cells, based on the adjacent cell's value, to achieve something like this:
The goal is to highlight values in Column B (Actual Expense) red if the value is greater than it's adjacent value in column C (Expected Expense). I've followed a number of tutorials that said to apply conditional formatting by selecting Conditional Formatting>New Rules>Use a Formula to Determine Which Cells to Format then applying a rule =$B4>$C4 which would format the 'Actual' cell red if it were greater than the 'Expected' cell. This works great for one cell, but not so well when I attempt to apply this to a range of cells. I've used the format painter as well as editing the rule to be applied over a range of cells (i.e. $B$2:$B$5) as shown below but it only bases the formatting on the initial formula (if B4 is greater than C4) and everything undesirably turns red.
I'd rather not make individual rules for every row. Is there a way to consolidate this into one rule?
You need to take out the $ signs before the row numbers in the formula....and the row number used in the formula should correspond to the first row of data, so if you are applying this to the ("applies to") range $B$2:$B$5 it must be this formula
=$B2>$C2
by using that "relative" version rather than your "absolute" one Excel (implicitly) adjusts the formula for each row in the range, as if you were copying the formula down
I don't know if maybe it's a difference in Excel version but this question is 6 years old and the accepted answer didn't help me so this is what I figured out:
Under Conditional Formatting > Manage Rules:
Make a new rule with "Use a formula to determine which cells to format"
Make your rule, but put a dollar sign only in front of the letter: $A2<$B2
Under "Applies to", Manually select the second column (It would not work for me if I changed the value in the box, it just kept snapping back to what was already there), so it looks like $B$2:$B$100 (assuming you have 100 rows)
This worked for me in Excel 2016.