Conditional Formatting for Blank Cell Does not Give Expected Result - excel

I am trying to format a cell, the goal is to have a Green Fill if the adjacent cell (on left) is blank and Red Fill if not blank. Below is the Code applied to Column D
="ISBlank(($C$2)"
and a snapshot below target cell
I am not getting the Desired result, the cells in column D remain white (excel default format of cells)
Please see the Data I am using below

I don't think you need the $ before the 2 in =ISBLANK($C$2) otherwisethe conditional formatting will only refer to C2. I think you'll want:
=ISBLANK($C2)
Also if the contents in column C is ="" , ISBLANK will return FALSE, assuming you don't want that behavior, you could try:
=LEN($C2)>0
Which checks how long the text is in C2.
Example:

Occasionally I've also had trouble getting is blank() to work properly. What I would try is:
$d$2 = ""

1] Do way with the double inverted commas
2] The Applies to range must be more than a single cell if you want the CF to apply across a range of more than one cell
3] You don't need two rules
Select ColumnD and 'standard' fill red. (Remove fill from D1 if preferred). Select ColumnD (this sets the Applies to range) and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=ISBLANK(C1)
Format..., select green Fill, OK, OK.
You do not need to lock the column reference because you are only applying the CF to a single column. You must not lock the row reference if to apply to multiple rows on a row by row basis.
With the above if a cell is red and has an apparently empty cell on its left then that cell is not actually empty.

Related

Compare cell data in Column B to all of Column A and turn green when there is a match

In excel, I have the following:
I am trying to find the quickest and most user-friendly way to compare columns 2 and 1.
If a name in column 2 (in the format shown below) matches ANY of the cells in Column 1, the cell in Column 1 goes GREEN, indicating that user is PRESENT in Column 2.
I have played around with conditional formatting but would appreciate any direct and efficient solutions.
I was trying to adapt a version of this, but it failed to work:
=SUMPRODUCT(--(MID($A4&" "&$A4,FIND(",",$A4)+2,FIND(",",$A4&" "&$A4,FIND(",",$A4)+2)-FIND(",",$A4)-2)=$B$4:$B$33))
where the above formula was added on highlighting the first column and then ensuring the A4 referred to the first item in Column 1 and the B was the first and last item in column 2. As mentioned, this didn't work.
Update
Tried this as well but didn't work.
This answer written assuming column1 = column A, and column2 = column B
Apply a conditional format on column 1, set up with green background, with the formula =COUNTIF(B:B, A1)>0
Apply another conditional format on Column 1, set up with red background, formula =COUNTIF(B:B, A1)=0
Edit those formulas as necessary so that:
B:B is the address of column 2, the range you're looking in for each name
A1 is the address of the first (top-left) cell that the conditional format applies to.
You can select both columns and do Conditional Formatting, Highlight Cells, Duplicate Values. That would be the easiest way to compare. You can format the cells in the first list with red fill if you want them to be red and set the format for duplicate values with green fill. This will format it in the color scheme you showed. If the name is removed from the second column, the cell will go back to red.

Excel - Conditional Formatting: If the cell above is different, change fill color

So the problem I have is trying to change the fill color using conditional formatting in excel. This is basically what I want to do:
First I have a column, something like this:
1
1
1
2
2
3
4
4
4
Now I want to use conditional formatting to check if cell A2=A1, if it is to have fill color #1, and so on. Once it gets to cell A4 and it checks that A4=A3, if it does not match I want it to switch the fill to fill color #2, and it continues to check. Basically every time the cell does not match the value of the cell above, to switch to a different fill color.
I tried using the OFFSET function to check if that value was the same as the cell above, that worked but once I added the function to conditional formatting it went all funky and did not change colors.
Using your sample data, say you put them into cell A1 to A9, highlight cell A2:A9 only, and set up the conditional formatting as shown below.
For duplicated value you will use =A2=A1
For different value you will use =A2<>A1
select a cell outside of your table (let's say it's Z1) and fill it with the value: AB
cell B1 value: A
in all cells from B2 downwards: =IF(A2=A1,B1,SUBSTITUTE($Z$1,B1,""))
it means that if A2<>A1, B2="B"; if A3=A2, B3=B2="B"
fill all cells on column A with the color you want for "cluster" B: let's say it's blue
add "$B1="A" in conditional formatting, filling = red

How can I represent different status' through colour coding?

I want to change the colours of cells in a specific column when I enter "Y" in one of 3 other columns.
example: when I enter a "Y" in B3 the cell A3 turns red.
There is more, I want to create a whole table that has three columns each representing a form of communication. When a person requests to be contacted I can put a "Y" in one of the columns depending on the communication type.
When I put a "Y" in one of the three columns the cell in column A of the corresponding row turns red.
example: when a "Y" in one of any of the cells from B3-B33; C3-C33; D3-D33 the cells in for corresponding row from the A column turns red.
example: when a "Y" is placed in B30, A30 turns red; when a "Y" is placed in C7, A7 turns Red; If a "Y" is entered into D16, A16 turns red etc.
Then, I want the cell in the A column to turn yellow when an "X" is placed into the corresponding E column on the same row this is represented by the person have being contacted.
Then, I want the cell in column A to turn green, when the and "X" is place into the F column of the corresponding cell in Column A on the same row. This represents that the person has responded and dealt with.
I have tried work out excel code to make these conditions work but I am struggling. Any suggestions?
You can use conditional formatting in this order:
First apply conditional formatting for Column F (check mark on "Stop if True")
Second apply conditional formatting for Column E (check mark on "Stop if True")
Third Apply conditional formatting for Column B,C & D
To add conditional formatting, follow these step:
Go to Home tab > Conditional formatting > New Rule
Select: Use a formula to determine which cells to format
Input the formula shown in image
Format the fill color per your requirement
Click on Apply
To apply to the column A, you need to change applies to range using:
Conditional Formatting > Manage Rules > Select the rule and change
range address depending on your data size.
Please see this image:
The third condition is as under:
Have you tried to use conditional formatting? you can start off by doing a simple case.
In order to have multiple cases apply to the same cell you can access the conditional formatting rules manager from the conditional formatting menu.
From there you can add additional rules for a cell.
For the formula itself i'd advise choosing: use a formula to determine which cells to format.
When the formula returns "true" the formatting will be used, so then you can make it search for all the row range you mentioned for the character you decide, you will need 1 rule for each color/character.
once you have done the formatting for one row you can drag it to apply it to all the rows if i remember correctly.

COnditional Format for cells in a colomn based on value of corresponding Row in another Colomn

keep messing up formula trying to do a conditional format for cells in a column based on if the corresponding Row in another Column has a specific Value.
="IF+$A:$Arow() = D ?
Don't think I'm even close but I need the condition format For all of Column H to check the same Row in column A If its a D then format the cell.
Can anyone help?
Select all cells in column H, say H1 has a column header, so you select H2 to H100, click Conditional Formatting > New Rule > Use a formula to determine ...
Enter this formula:
=$A2="D"
Select a format and confirm all dialogs.
When you select all cells from H2 down, the cell H2 will be the active cell. The conditional formatting formula contains a cell address in column A with a relative row reference, i.e. there is no $ sign in front of the row number. The most important bit is that this row number must be the same row number as the active cell when you create the conditional format, so if your selection starts in a different row, you need to adjust the formula accordingly.

Conditionally format one cell based on values in a column

The user enters a date/time into cell B2. If this matches one of the values in column L I would like to format cell B2 as red, else format cell B2 as green.
Any idea how to do this?
Please format B2 green with standard fill, then apply the following Use a formula to determine which cells to format, Format values where this formula is true:
=match(B2,L:L,0)>0
with formatting (red) to suit and Applies to B2.
Assuming you are using Excel 2007 onwards:
Set cell shading for B2 = Green
Select Cell B2 and select the Conditional Formatting > New Rule menu item
Use a formula to determine which cells to format
In the formula bar, put in =ISNUMBER(MATCH(B2,$L$6:$L$100,0))
For format, change shading to Red
Obviously change the $L$6:$L$100 to suit you, but that should do it...
What about breaking this up into two steps.
Try putting a simple formula in Cell B1:
=ISNUMBER(MATCH(B2, L:L, 0))
This will return a TRUE if there's a match and a FALSE if there is not a match. Then make two conditional rules based on Cell B1.

Resources