Excel - Conditional Formatting Based on Selection - excel

Suppose that I have following data
I want to perform conditional formatting in cells containing Y. For example if I select the cell Shirts I want all the cells where Shirts is Y to be highlighted yellow. Similarly if I select cell Books I want all the cells where Books is Y to be highlighted green.
How can I achieve that?
Expected Output (Shirts Output)

I set some conditional formatting so if I enter "T" in one cell (Y3) then the selected cells (Y$:Y200) get formatted yellow with a border like so:
Just expand the formula to do what you need, perhaps and() to include "book" etc
And(y3="T",y4="Books")
as an example. Edit and test as you need.

Related

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

In Excel I have two columns, I want to highlight based on text values in the right col

Is it possible to do this with conditional formatting?
Say if the right clumn has the word "TRUE", I want to highlight the cell on the left of the column green.
this is what i tried:
cell value if true =$I:$I,$L:$L,$O:$O but it not applying to the column to the left, just the column with the text match
You simply need to select the range you want the formatting to apply (green in your case), then look for the white cell, in my case, it's A2 the white cell, and use a formula that will work for this particular cell, in my case, it would be when B2 is TRUE, so I use =B2=TRUE:
Result:

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.

Change colour on row in one sheet if same value exists in second sheet

I have a sheet named Skruvdragare where cells B1-B500 contain serial numbers like: 123456789, 987654321 etc and a second sheet Låda 1 in which I will also put in some serial numbers (not necessarily the same numbers as in the Skruvdragare sheet).
If I put in a serial number, anywhere in Låda 1, which exists in Skruvdragare I want the row for this serial number to turn to red background and white text in the Skruvdragare sheet.
Use Conditional Formatting for this. But, as I've learned right now, the formula must not contain references to other sheets...so we work around this limitation by putting the formula into an auxiliary column in sheet2:
=NOT(ISERROR(MATCH($A1,sheet1!$A$1:$A$500,0)))
and the conditional format just contains the formula
=$D1
if the aux column was "D". Copy that format to as many cells you like (except for the aux column!).
Please Define Name of Workbook Scope for Låda 1, say OtherSheet:
Select the cell, range of cells, or nonadjacent selections that you want to name.
Click the Name box at the left end of the formula bar.
Name box
Type the name that you want to use to refer to your selection. Names can be up to 255 characters in length.
Press ENTER.
Select from Row1 to Row500 in Skruvdragare and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
=COUNTIF(OtherSheet,$B1)
Format..., select red fill white font, OK, OK.

Conditional formatting to change background (colour) and text (wording) in another worksheet

I really need help in Excel 2013, using Conditional Formatting (I think). I have a few worksheets that I need to draw data from in a summary page. In this summary page obviously I need to use colour, which I can do, but to further complicate things, I'm trying to find out that if a cell in, call it worksheet 2:
shows 1, the summary worksheet must not only change colour, but it must replace the number 1 with ship - cell colour green.
If the cell says 2, the summary page must say road, and cell colour orange,
if the cell says 3, summary page must say air and change colour to red.
Is there anyway that it can be done this way?
You need a combination of formulas and conditional formatting. Say Sheet1 has the summary and Sheet2 has the numbers you mention in cell A1. In Sheet1 you can use a formula
=CHOOSE(Sheet2!A1,"ship","road","air")
Use conditional formatting in Sheet1 to color based on the text the cell contains. Select cell A1 and create three formats that use formulas like
=A1="ship" -> Format green
=A1="road" -> format orange
=a1="air" -> format red
Is there anyway that it can be done this way?
Yes but, with this proposal, subject to there being content in summary sheet to begin with. 0 in each cell to be formatted would suffice. Say the formatting is to be applied to ColumnA, please select Column A and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true::
='worksheet 2'!A1=1
Format..., select Fill, green, and for Number, Custom:
"ship"
OK, OK.
As above ='worksheet 2'!A1=2, orange and "road".
As above ='worksheet 2'!A1=3, red and "air".
To hide any 0s that are not formatted, select ColumnA and Custom Format:
0;0;;
All the above assuming a one-to-one relationship for the rows between the sheets, so if A3 in worksheet 2 has 3, then that would trigger A3 in the summary sheet to be red/air.

Resources