Conditional formatting based on cell in different column but same row - excel

I apologize if this has been posted, but I haven't found a solution that works.
I have an excel sheet with a lot of data.
I want to make the cells in a certain column (column CG) turn purple if the value of a cell in a different column, but equal row is "no". For example, I want the cell in column CG row 140 to turn purple if the cell in column CS row 140 is no. I want this to happen for every cell in the column. I tried to set up a conditional formatting rule such that the rules applies to =$CG$4:$CG$200 and for the formula I've tried $CS=no, $CS="no" $CS4="no" and $CS4=no with the formatting just being a purple highlight. I've tried hitting apply and ok, but nothing works.
I used these link to determine what to do for my rule.
Conditional formatting based on other column
Excel Conditional Formatting based on Other Column
Any suggestions?

Simply highlight the entire column "CG" then open the CF dialog.
Select the option Use a formula to determine which cells to format and type in the following formula:
=$CS1="no"
Then proceed to set your formatting, in your case, a purple fill.

Related

Conditional formatting cells based on adjacent cell

I am trying to show that a cell must be filled in. I want to use conditional formatting to highlight the cell isn't filled out using conditional formatting. Based on an EMPTY spreadsheet (gets filled in weekly by row, so I don't want a bunch of red cells until a line is filled in). I want a cell in column I to turn red when either columns "B:H" have text. Then if the person fills out a cell in column I the coloring goes away. I have tried =AND(ISTEXT(B#),ISNONTEXT(I#)), but this means that when a different row in column B is filled out the conditional formatting doesn't work. I then tried to individually put the condition formatting in, but it only works on the first 2 rows. I also tried =AND(ISTEXT($B#),ISNONTEXT($I#)) to show that it is based on the column, that also didn't work. Any help would be greatly appreciated.
Assuming B:H are empty. You can use an AND formula looking at COUNTA (of B:H) combined with ISBLANK (column I).
Select range I2:I4 and input this formula into your Conditional Format Rule:
=AND(COUNTA(B2:H2)>=1,ISBLANK(I2))
Then change your conditional format fill as RED.
Output:

How do I change the color of a column based on the color of other column?

I am having trouble coloring cells in a column (if a cell D2 is light green, then B2 is colored light green).
I have tried using conditional formatting, and looked at Changing Color of a column based on other column in put
However, I do not know what to put in formula to say that a cell D2 is light green.
Let me know if I broke any rules here, and I'll fix.
Like I said many times before: Color is not data. There is no worksheet formula or conditional formatting rule that can evaluate the color of a cell.
The reason or logic for that manually applied color is in a person's head, but not derivable from data in the spreadsheet.
Use real data in the spreadsheet if you want to use conditional formatting or worksheet formulas.
If you want to evaluate cells by their color and apply that same color to another cell, you will need to use VBA.
Apart from using vba, if you can tolerate the following:
manually refresh the conditional formatting for Column B each time you change the colour in Column D
save and continue to use your workbook as .xlsm (macro enabled workbook)
then try the following:
Please note I used the following sample data (starting from the first row) where Column A serves as Column D in your question:
In the Name Manager, set up a name called GetCellColour with the following formula:
=GET.CELL(63,$A1)
Replace $A1 with $D2 or the actual cell reference in your real case. This should be cell that will trigger the conditional formatting in B2.
Set a light green colour in cell A1, and in a blank cell say C1 enter the following formula:
=GetCellColour
In my example the colour code returned by the above formula is 35 for light green.
Highlight Column B (or the relevant range in Column B that you want to apply the conditional formatting rule) with cell B1 being the active cell, go to Conditional Formatting function to set up the following formatting rule:
=GetCellColour=35
Then your cells in Column B will be highlighted by light green colour if the corresponding cell in Column A is colored in light green. Please note, if you changed the cell colour in Column A, you need to go to Data tab to Refresh the worksheet to "update" the conditional format in Column B.
Here is a live demo:
For the use of GET.CELL function in the name manager, you can give a read to this article.
Let me know if you have any questions. Cheers :)

Conditional format cell if row contains one or more blank cells?

Imagine a sheet where column A is names and the other columns contain relevant information for those names. I want to conditionally format the cells in column A so that if there is a blank cell in that row that should be filled, the name cell will display the conditional formatting; think of it like a "there's missing info for this person" indicator.
Before this gets brought up: while it's trivial to set up conditional formatting to color empty cells, coloring the blank cell itself has proven to be not sufficiently noticeable due to the width of the spreadsheet.
It's exactly as #mehdi said. You need to use COUNTBLANK(range).
For conditional format, use the option "Format Cells where this formula is true". My formula in cell A2 is like this:
=IF(COUNTBLANK(2:2)>0;TRUE;FALSE)
After typing it, just change the range where this rule applies and select your range data.
I did it like you can see in the image below (please, note I got spanish version of Excel). In my case, if ANY cell in the row is blank, then it colours with yellow the cell.

Conditional Formatting for a row when there is a text disagreement between two cells

I'm working on a conditional formatting issue. I would like the whole row to highlight if the text in the same row in columns B and C disagree. So far, I've been able to write conditional formatting rules that leave the cell un-touched if there is no data and if there is a data entry that disagrees with the text in Column B, but I can't seem to get the formula to apply to the full row.
Here is what I currently have:screenshot of the document with conditional formatting rules visible
I'm working on Excel 2010. Maybe there is a way to use a logic formula?
I look forward to hearing suggestions!
You can do this with a formula. Highlight the range you would like to format, create a new conditional format, select "Use a formula..." and enter the formula as it would apply to the first cell or in this case row.
In my case, I chose the first 6 rows: $1:$6 as my range. So in this case, I would enter the formula as if I were only entering it for my first cell. The formula =$B1<>$C1 will check for inequality between B1 and C1 in the first row, B2 and C2 in the second row, and so on.

Highlight cells based on 10-15 values and post alternatives

I have a 1600-2000 rows of data in a spreadsheet that changes daily. I would like to highlight any row that contains such as 000000000000053851 in the R column. I had tried conditional formatting using this formula:
=OR($R1="000000000000549543",$R1="000000000000267294,$R1="000000000000053851")
but it seems to highlight a few rows that are blank in column R also.
Using the same numbers highlighted in column R, I would like to have an alternate number and possibly other data pasted into the corresponding row in column S. Each number has a unique alternate number and data to go along with it. This is how I picture a line may look with the highlighting and alternate data next to it:
I intend to record a macro using a few of the different steps that are likely required to do this. Any way, whether conditional formatting or an array formula, would be great to help with this.
For the sample provided, a CF rule of:
=LEFT(R1,12)="000000000000"
applied to ColumnR will format the sample and if you wish the cell immediately to the right. It will not highlight blank cells.
HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true:, enter formula from above and Format... with Fill red, OK, OK.
If you want the cell to the right to be formatted also, select ColumnsR:S instead of just ColumnR and change R1 in the formula to $R1.
For the cell to the right you provide few details but VLOOKUP in conjunction with a two-column table should suit. Column on the left being the ColumnR value, with the right-hand column for the same row the ColumnS value required. This table could be placed almost anywhere.
This could all be done with Record Macro.

Resources