I have two columns: In the first there might or might not be a value;
in the second column, if the first cell next to it is empty, I want to colour the cell in a grey colour.
Is there an easy way to change a cells background colour, if a different cell is empty?
Please select your second column and with Format, Conditional formatting..., Format cells if..., Custom formula is enter:
=isblank(A1)
and for Formatting style choose grey fill, Done.
Change "A" in the formula to the reference letter for your first column.
Related
I am using conditional formatting to highlight a row if a cell has something entered and will remain highlighted until all cells in that row are filled.
=COUNTA($B$2:$E$1)>0
*Conditional format if true changes the cell interior to Yellow (B1:E1)
For each cell in the COUNTA, I use conditional formatting to change the cell to white if No Blanks.
This is making my conditional formatting cue huge. For each line, there is a conditional format to change to yellow with COUNTA, then each cell has a conditional format to change it to white when it has any data entered.
My question is; is there a better way to accomplish this without conditional formatting?
My goal is to have the sheet - each row - white. If any data is entered into any cell, it will highlight the entire row in yellow until every cell in that row is filled out making the entire row white again.
One formula makes it!
Keeping in mind you have headers in row 1, the region starts at row 2
=AND(COUNTA($B2:$E2)>0;COUNTA($B2:$E2)<4)
=$B$2:$E$35
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
I have a table that has Color and Progress Interval Columns, I wanted to change the cell color in Progress Interval Column based on cell in Color Column. Example if Cell D2 says Green, E2 will be filled with Green.
Snap Shot From Table
Conditional Formatting
If Progress Interval is in column E, select the range from E2 to the last cell e.g. E20 and go to Format >> Conditional Formatting
choose Formula is and copy/paste the following formula:
=D2="Green"
Now click Format and click on the Patterns tab and choose the green color you need and change anything else (Font, Border). When done click OK.
Now you can click Add to add another condition and do the same for Yellow. When finished click OK.
If you want to exclude cells that contain no data use:
=AND(E2<>"",D2="Green")
Now only cells in the E column containing data will be hightlighted.
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:
There are two columns; the first contains four colored cells, while the second contains numbers. Is there any way to color the second column so that it matches the colors of the first column in the same order.
Eg. A1=Green, A2=Red, A3=Grey, A4=Black (COLORED).
B1=4, B2=3, B3=2, B4=1 (BLANK).
= A1=Green, A2=Red, A3=Grey, A4=Black (COLORED).
= B1=4 (Green), B2=3 (Red), B3=2 (Grey), B4=1 (Black) (COLORED).
Manually coloring the column will not work here because I want a cell in the second column to be able to match the cell next to it if its color changes. So for instance if a cell in column A changes from "black" to "red", I want the corresponding cell in column B to change from "black" to "red" automatically.
Eg. A1=Green, A2=Red, A3=Grey, A4=Red (COLORED).
B1=4 (Green), B2=3 (Red), B3=2 (Grey), B4=1 (Black) (COLORED).
Here A4 is now "red", while B4 is still "black". I want it so that if A4 changes color, B4 will change color to match A4.
I tried experimenting with conditional formatting, but that doesn't seem to be working out so far, would there be a formula for something like this, or am I SOL?
This is possible using Conditional Formatting.
You would have to select both columns and then choose to use a formula for the conditional formatting.
There you would input
=$A1="Red"
and set the formatting to red.
The $ fixes the formula to the first column. If you omit it, only column A would be colored in.
That way you would have to write the cell background color in column A, and if you set the font color to the same value you won't see it...
Another option would be to use a VBA macro, that runs on every SheetChange Event that will copy the background color from column A to column B
Edit:
As #lowak pointed out, you will have to create one rule for each color.