excel conditional formatting comparing different rows and columns - excel

I'd like to change background color of cells if the value of $E2=$F1 (comparing different row and column). The range I have selected is =$E:$F.
I want the background color changed in both same value cells or at least on the first column cell. The problem is that I don't know of to tell excel to change the "1st. column, 2nd. row" of every comparison. Excel is changing only the cells of the first row and not the cells that have the same value.
Excel Sheet
Formula
I don't speak English, I hope you can understand what I am saying. :-)
Thank you!!!

Create a custom formula rule as =$E1=$F1, and apply it to the range =$E:$F.
Be careful that this will see two blank cells as equals and turn them red, so you're better off doing =$E3=$F3 applied to the range =$E3:$F12.
EDIT
Now I understand your question, just create two different rules,
=$E4=$F3 applied to range =$E4:$E12
=$E4=$F3 applied to range =$F3:$F12

Related

Compare two sheets of data and highlight difference

I need to find a way to compare two sheets of data in a workbook. The columns are exactly the same. However, the rows are not the same. The conditional formatting would have to compare the cell to all of the cells in a column on another sheet to see if there was a match if yes then color red. If no, then color green.
I have tried another solution provided here but it didn't work since the rows were different.
Is this possible?
This is what I have tried.
Formula:
=AND($C1<>"",COUNTIFS($C:$C,$C1,'Existing Data'!$C:$C,$C1)=0)
Highlight is green.
I'm trying to find the ones that are not already in the existing data.
I tried the formula I entered in above.

Excel Conditional Formatting - Highlight blank cells between

thanks in advance for the help.
I'm making a Gantt chart in Excel and am trying to integrate the capability to highlight the work week (WW). The idea is that one can select the WW from a drop down menu and the corresponding columns in the chart are highlighted. I am struggling with the conditional formatting formula to highlight the desired dates.
Here's a screen shot of how the chart is set up
I am able to highlight the column of the cell containing the WW value (e.g. in picture column I is highlighted as it contains "WW42" in cell I3. I would like to be able to highlight the days from Sunday to Saturday of each WW.
Most formulas (that I know) work on the value of the cells rather than their location or index. I have tried simply filling in all the blank cells with the WW value and then hiding the value, but the formatting isn't aesthetically pleasing and it's not efficient.
I have also tried merging the WW cells, but am unable to select all columns of the length of the merged cell, just the first column associated. For example, if I merged I3 to O3, conditional formatting will highlight that merged cell and only column I.
Any suggestions on how to approach this is greatly appreciated!
Attached is a screenshot of my structure with my conditional formating working as required. You'll need to adjust acording to your structure, but I used a formula-based conditional formating, with the rule:
=COUNTA($B$2:B$2)=$A$1 //Where A1 contains the workweek I want to highlight
Entered into cells $B$3:$V$6. Of course, in your case you'd have to change it to something like:
=COUNTA($B$2:B$2)+41-3=$A$1
Since your work weeks start at 42 and you have 3 extra headings you dont want added on your sum (ACTUAL START, ACTUAL DURATION and PERCENT COMPLETE). Also the header for the work week has to be a numeric value, but you can play around this to get what you need. Let me know if you'd need further help.
You do not need to use the third row for your conditional formatting, if row 4 has legal excel dates. The WEEKNUM() formula gives you exactly what you need.
If your Dropdown Menu is in cell B2 and consists of numbers from 1-52 then this should work for your conditional formatting:
=$B$2=WEEKNUM(D$1)
See attached photo.

Excel Help: Applying Conditional Formatting to Numbers in Percentage format

I am currently trying to apply conditional formatting to certain rows which contain numbers in percentage (e.g. F11 to N11; F14 to N14; F17 to N17 and so on). These are also the only rows in the worksheet that have numbers in percentage. Would like to know what the fastest way to go about doing this is.
Should I:
(i) apply conditional formatting to the whole worksheet to numbers in percentage (if possible) or
(ii) apply conditional formatting to each individual row which is extremely time-consuming?
Appreciate if anyone can help.
Thanks in advance! :)
If your data in the percentage rows is also formatted as percentage, you can use the =CELL("format",[reference]) function, that returns "P0" or "P2" for percentage formatting.
Use a helper column (which you can hide if you want) to check the formatting of the first/last cell in the row, and then set conditional formatting based on the column:
After you create the column, you set a conditional formatting rule on the the upper-left cell in the range based on the formula: =[top cell in helper column]="P0". Keep the column fixed with a $ but not the row, as in the screenshot below, so you can drag the formatting to all the range with correct reference to the helper column.
Next step is to drag this cell to all the range, choosing the "formatting only" option:
Finally, you have to format again all rows that contains percentage values to percentage formatting.
However, if the place of the percentage rows is fixed, you don't need that CELL() function, just write in the helper column something like p or 1 for the rows to format.
(I have also tried to plug the formula directly to the formatting condition, but it doesn't work well all the time)
Tell me if it solved your problem ;)

(Excel) Conditional Formatting based on Adjacent Cell Value

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.

Excel conditional formatting of adjacent cells from a drop down list

I've been searching around here but I can't find anything quite like what I'm after.
In excel I have one column with a drop down list of a dozen different initials, with conditional formatting on those cells. I would also like to format another column based on those initials, but don't want to set up a dozen rules on each cell, one by one. If I set up the top cell with the correct rules I cannot fill the formatting in because the formula is not updated on a row by row basis, but en bloc for the range.
I have no real experience with VBA or macro's, is there a way to do this more elegantly than brute force?
Thank you very much in advance. This forum has always been a great help, hopefully you can help this, too!
I hope I'm not misunderstanding your question. You can copy the formatting to the other columns if you have set up the format as a formula. For example, if A is your column with initials, and you have a data cell in B2, then you can set a formula in B2 as A2="ER", for example, with the formatting you want, and do the same for the rest of your matches on A2. Then, you can copy the format down column B (unfiltered) using Paste Special Format. You can copy the conditional formats across as long as you make sure that your format in the conditional formatting rule is anchored on column A (i.e., $A2="ER").

Resources