How can I represent different status' through colour coding? - excel

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.

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.

dynamic conditional formatting based on dropdown

I have 7 Columns, 5 with data and the first two with names. Is there a formula I can use in conditional formatting where if I change my column from the drop-down, conditional formatting will look in that column and highlight the name with less than 25, and when i change the value of Capture, the purple highlight across the columns changes too?
.
Hope it makes sense
Suppose you have the following named ranges:
Capture being the column number that you want to change dynamically;
ListFOR being the list of names you have in the FOR column;
RngData being the values in your table excluding the first column and column headers.
I will use the following example to demonstrate my answer:
To highlight a specific column by changing Capture value:
Highlight range B3:G10 (which is the 6 columns including headers on the right) with cell B3 being the active cell;
Use the following formula as the Formatting Rule in conditional formatting and set the background color as desired:
=COLUMN(A$1)=Capture
The logic is to compare the value returned by COLUMN function with the Capture value, if they are the same i.e. TRUE, apply the conditional format.
To highlight a specific name or names with value less than 25 in the highlighted column from previous step:
Highlight range A4:A10 (which is the first column without header) with cell A4 being the active cell;
Use the following formula as the Formatting Rule in conditional formatting and set the background color as desired:
=INDEX(RngData<25,MATCH($A4,ListFOR,0),Capture)
The logic is to first convert the values into TRUE or FALSE by comparing them with 25, then use INDEX+MATCH function to return the logical result based on the given name, if TRUE apply the conditional format.
Here is a live demo:
Let me know if you have any questions. Cheers :)

Conditional Formatting for Blank Cell Does not Give Expected Result

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.

excel conditional formatting with data

I am trying to format different columns of my excel sheet based on two conditions:
if the cell does not contain the letter "u" or the letter "r" and if it is greater than a set number.
For example, if I have a column of data, I would want 0.3 highlighted because it is greater than the set number of 0.00834 and does not contain U or R. I don't want 0.0071U to be highlighted or 0.0056J.
Any help?
Select the cells/column(s) you want the conditional format applied
to (for this example I assume you use column B:B)
Check which cell is active - the "white" cell in the blue selection. (I assume it's B1)
Create a new conditional format Home -> Conditional formatting -> New Rule
Select "Use a formula to determine which cells to format"
Enter the following formula: =AND(RIGHT(B1,1)<>"U",RIGHT(B1,1)<>"R",IF(ISNUMBER(B1),B1,VALUE(LEFT(B1,LEN(B1)-1)))>0.00834) Make sure that the B1 is your active cell from step 2. Also make sure that it is not using any $ to fix row or column.Note: The formula assumes that your cells contain either proper numbers - or number and a single letter at the end!
Set the format you wish in the Format dialog.
Done!

Excel 2010 - Conditional formatting, color adjacent cells in same row

Is is possible in Excel 2010 to set a conditional formatting rule to highlight all not empty cells in a row when the cell in particular column has a particular value?
I have a report in which every row identify a day. I would like to colour in grey the rows relative to Saturday and Sunday. The day is stored in column C.
I know how to highlight cells in column C, but how can I easily extent the format of cell C to the adjacent not empty cells in the same row?
This is easy to do without a macro and without using INDIRECT function
Assuming you have data starting at row 2 and that the "day" in column C is a text value then do this:
Select whole range of data, e.g. A2:J100
apply in conditional formatting the formula that needs to apply to the first row, e.g.
=AND($C2="Saturday",A2<>"")
That will apply formatting to all cells in the range if col C of that row is "Saturday" and the cell itself is not blank. Note C2 needs a $ in front because it applies to C for the whole row A2 doesn't need $
If you want to apply to Saturday and Sunday the same type of formatting then use an OR, i.e.
=AND(OR($C2="Saturday",$C2="Sunday"),A2<>"")
....or if the column C entries are actual dates make that
=AND(WEEKDAY($C2,2)>5,$C2<>"",A2<>"")
See example workbook with that last CF formula demonstrated
Taking inspiration from John answer in this thread, I've used the "indirect" function on the conditional formatting.
Select Conditional Formatting
Select New Rule
Select "Use a Formula to determine which cells to format"
Enter the Formula, =WEEKDAY(INDIRECT("c"&ROW()))=1 # for Sundays
Enter the Format you want (text color, fill color, etc).
Select OK to save the new format
Open "Manage Rules" in Conditional Formatting
Select "This Worksheet" if you can't see your new rule.
In the "Applies to" box of your new rule, enter =$A$1:$J$35 (or however wide/long you want the conditional formatting to extend depending on your worksheet)
Do it again, this time inserting the Formula, =WEEKDAY(INDIRECT("c"&ROW()))=7 # for Saturdays
There is only an issue with this formula. When the cell in Column C is empty it will be read as 7, therefore the row will be formatted as if it's a Saturday. Do you know why?

Resources