I'm trying to do conditional highlighting for a given row.
If a specific cell in a row isn't blank, then I want more highlighting to be done on the row;
If (1) is true, then I want each cell in that row which isn't blank to be filled with the same color.
One important factor is that I have functions which return no values, making the cell appear blank (e.g. ""). These cells should be highlighted if (1) is true. Because of this I have been using the length function LEN() to determine if a cell is empty as ISBLANK() won't work.
The current highlighting rule I am using is:
=AND(LEN(E274)<>0,LEN($F$274:$U$274)=0)
I am stuck on what to put in the Applies to box. Currently it just selects one cell.
My main problem is replicating the formula over each given column in the row without creating tons of rules. Then if possible I want to do the same thing for about 200 rows.
Suppose you want to highlight something in A1:h18, and the specific cell ist always in column then (if i understand you right)
1. mark a1:h18
2. and use the following formula
=AND(LEN($a1)<>0,LEN(a1)<>0)
Related
I have a spreadsheet that has the following columns:
Tactic, Impressions, Engagement, Clicks and Forms. The tactic column contains a dropdown menu on each cell that has x amount values, for simplicity lets say it has 2, Value1= "A" and value2= "B".
if cell A1(where the Tactic column is) contains the value "A" then I want to highlight in say "Yellow" colour the adjacent cells of the Impressions and Engagement columns and if the value of cell A1 is "B" I want to highlight the adjacent cell of teh Forms colum in yellow but not any other column.
Basically, I need to be able to select a Tactic and the columns that require data to be entered based on that tactic to be highlighted to the user. And this needs to be applied to x number of rows in the spreadsheet?
I can accomplish this partially by using conditional formatting and using a custom formula. please see picture below but the problem is that the rule only applies to that particular range, in this case E2-F2. I need excel to "Know" that when the value of the Tactic column in any row changes or it is filled up for the adjacent cells to be highlighted based on the formula.
Is there a way to make this conditional formatting dynamically obtain the row index where the Tactic selection was made and apply the cell colour to columns E and F but only on the row where the selection was made without having to hardcode each row with this conditional formatting?
Thanks for your help!
On "Formula" use =$D2="A"
On "Applies to" select the whole Column-Area
This should do the trick
You want one set of cells across the row highlighted on condition A and a different set of rows highlighted for condition B.
You will solve this by creating TWO rules.
Rule "A" is the =$D2="A" rule, with an applies to range that is the rows you want to highlight for condition "A".
Then click "New Rule" and add =$D2="B" and make the applies to range only the column you want to highlight on condition "B".
You can just keep on going and adding a condition C, D, E, etc... one new rule in the rule manager for each cell highlight combination.
The rules are applied in order, so in some cases where a row may meet more than one condition, you'll need to move the rules to be in a specific order and check the Stop if True box. This creates an "If/elseif/elseif..." structure.
But in your use case, a row can only trigger one of A or B conditions, so there's no sequencing necessary.
Conditional formatting can be counter-intuitive. In Excel we have to change our thinking away from a procedural approach to a fully object-oriented approach. We don't "send" values to a cell, rather, we can only tell the cell, by the means of its formula, how to determine its own value. But in conditional formatting we have to go back to some procedural thinking in the way we develop the conditional logic.
I have a sheet with 10k+ rows that I get every day. I have about 50 formulae that I run against this sheet to count certain occurrences, and example of this is
=COUNTIFS(B:B,"*.jpg")
But as well as returning the totals I want the sheet to highlight every row that has been counted.
I thought I could maybe to that with conditional formatting but I cannot get it to work.
Thanks for any advice.
I have attached a snap shot of an example sheet where the rows are colour banded using conditional formatting.
The rule I used to validate if formatting applies has to equate to TRUE. I test my rule off to the side in cell E1 in this case. I can also copy it across to make sure I have the $ in the right spot. When its doing what I want and evaluating to TRUE or FALSE in the right spots, I edit the cell and copy the formula. I then highlight the range I want to apply it to, in this case A1 to B7 (though technically we can adjust later), and I make sure that A1 is the active cell in the selection. Then I go to the Home Ribbon and select conditional formatting and get the pop up window below:
You can select all the formatting options for when things are true by left clicking the "Format..." button.
As per Tim's s comment, select the last one from the rule type list "Use a formula...". in the blank bar below paste your rule that will equate to TRUE or FALSE. so in our case the rule I used was:
=ISNUMBER(SEARCH($C$1,$A1))
Basically I am doing a non case sensitive search in cell A for the criteria in C. IF cell A1 has it, it will return a number. ISNUMBER will check that its a number and return TRUE. If it could not find C1 in cell A1 then it would return an error and ISNUMBER would come out false.
Finally we can see where the rule will apply. So if you have 10K rows, it may be easier to simply type in the number of the last row here instead of selecting it manually, though that would still work.
I created 1 colouring rule for each file type I was searching for.
UPDATE
I am not familiar with how your internal array of {"File","VALID"} works, but I am going to assume that you want to count them if column D is equal to one OR the other AND column F is equal to "G_NOT". In this case since those are the only words in the appropriate cell I will not use the search method and instead just use the following as your formula rule for conditional formatting:
=AND($F1="G_NOT",OR($D1="FILE",$D1="VALID"))
This assumes there is no header row and your data starts in row 1. If you have a header row change change those 1 to 2. Have your left most Cell to your right most cell selected with the left most cell being the active cell. Then go into your conditional formatting. When you are done you can manage your rules, and adjust your range to go to the last row.
I am trying to highlight cells in a column in Excel that match a list of values in another column. Everything i have found so far like =NOT(ISERROR(MATCH(A1,$B$1:$B$1000,0))) only highlights the cell next to one that matches not the actual matching Values.
Basically i am tryingto highlight every value in column B:B that matches any entry in A:A.
You just about had it right.
Try this instead:
=NOT(ISERROR(MATCH(B1,$A$1:$A$5,0)))
Or in R1C1 mode (which, IMHO, is much easier to work in as the formula doesn't change regardless which cell in column 2 you're on):
=NOT(ISERROR(MATCH(RC,R1C1:R5C1,0)))
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.
I want to do conditional formatting on the following data.
Data Image
When first column (1c) value is equal to second(2c). Paint green else paint red.
Compare:
1r1c to 1r2c
2r1c to 2r2c
3r1c to 3r2c
Currently it is comparing r1c1, r2c1 and r3c1 to r1c2.
What's your current conditional formatting rule?
edit:
OK, your current rules are =$E$2 and <>$E$2, both applies to =$D$2
You are telling MS Excel to compare cell D2 with cell E2. First you have to apply your rules over area D2:D_many (you can apply rule over both columns to get both cells colored, sometimes it's useful). Second remove $ in your rules, change rules to =E2 or =$E2 If you apply conditional formatting rule over one column (D), there will be no difference, but if you apply rule over multiple columns (for example D:H), first one will compare cell with cell in the same row but one column right, second one will compare cell with cell in the same row and column E.
Ok.
I tried to create a new rule and got the correct format. I used this formula.
And the rule created was this
Now working fine. Thanks.