Excel: How to use conditional formatting to highlight missing data? - excel

I'm wondering how to use conditional formatting in order to highlight specific cells in a column that return an error message in another column after applying a function to it.
eg) Column 1 has data 1 ... n
Column 2 has data f(1) ... f(n); f(n) being a function that sometimes returns errors.
I want to color the cells in Column 1 that return the error in column 2. How would you do this? Thanks!

You can use a simple ISERROR().
Let's say that column 1 is A and column 2 is B.
Select cell A1 and then select the whole column. Cell A1 should be slightly less dark than the other cells (it's the active cell in the selected range). Once you have this, go to conditional formatting and under 'New rule' and 'Use a formula to determine which cells to highight', put the formula:
=ISERROR(B1)
Pick a formatting (e.g. Fill and yellow) and click OK. That should highlight the cells for which column B has errors.

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.

conditonally format cell in column A based on Criteria in other Columns

I have a report where columns BT:DB have 0's and 1's. If there is a 1 in that row for an employee, I'd like to highlight the employee's name in column A. I do not want to highlight the whole row.
How would I enter a conditional formatting formula to say: If a cell in this row has a 1 in columns BT:DB, then highlight those cells with 1's and also the employee name in column A of that row, as well?
You will need to apply your conditional format to Column A.
Home > Conditional Formatting > New Rule > Use a formula to determine which cells to format
Then use the formula: =SUM(BT1:DB1) (No locked cell references on row)
0 = False & >0 = True which will decide if your column is highlighted or not. You can also choose what range to apply the format to.
I used different ranges below so I can fit the example nicely into a screen shot. You will just need to update the ranges to fit your specific needs.

How to do a Conditional Formatting with hh:mm:ss format on Excel

I have two different columns. Each one contains timestamps in hh:mm:ss format, and I want to do a between comparition and check if the Value Colum 2 is between Value Column 1 Row 1 and Value Column 1 Row 2, and then, paint the cell in green, or in red if the condition is not satisfied.
Here my columns:
Column 1 Column 2
16:06:13 16:07:34
16:06:41 16:08:42
16:08:39 16:09:49
16:09:47 16:11:02
16:10:53 16:12:10
16:12:08 16:13:40
16:13:39 16:14:48
16:14:47 16:16:04
16:18:06 16:18:06
I applied a Conditional Formatting -> HighLight Cell Rules -> Between
then from Column 2 Row 1, I selected the first value from Column 1 Row 1 and the next value from Column 1 Row 2, but nothing happens.
Anyone can help me?
Thanks!!
Following the process you did:
Highlight the values in Column 2
Conditional Formatting -> Highlight Cell Rules -> Between
Select the first value from Column 1 Row 1 then delete the dollar signs
Select the second value from Column 1 row 2 then delete the dollar signs
Note: I see that there is sometimes a glitch in some versions of Excel which replaces your cells with cells at the bottom of the spreadsheet. I find if I just repeat the steps another time, it fixes the issue.
Two rules with two different formulas:
1st:
=MEDIAN(B1,A1,A2)=B1
And format it to Green
2nd:
=MEDIAN(B1,A1,A2)<>B1
Another alternative method:
Highlight the values in column 2.
Conditional Formatting -> New Rule
Select "Use a Formula to determine which cells to format"
Under "Format values where this formula is true", input: "=AND(B1 >= A1,B1 <= A2)"
Select "Format..." and choose the formatting you want
Click OK
Note that this method, vs. the other one I gave you, treats the last cell differently (since there's no value after it). The first one will highlight it, this one will not.
Note: With both methods, I see that there is sometimes a glitch where Excel replaces your cells (A1, A2, and B1 in this case) with cells at the bottom of the spreadsheet. I find if I just repeat the steps another time, it fixes the issue.
If you wish to stick with in-between you can
The data I have in those two fields is
=INDIRECT(ADDRESS(ROW(),COLUMN()-1))
=INDIRECT(ADDRESS(ROW()+1,COLUMN()-1))
You will still need two of these as said in other answers.

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.

Conditional Formatting in different sheet

I have a 13x13 table of data on a worksheet that is comprised of links to another sheet.
For example the first row of 13 looks like:
=Sheet1!R7 =Sheet1!R20 =Sheet1!R21 =Sheet1!R22 =Sheet1!R23 =Sheet1!R24 =Sheet1!R25 =Sheet1!R26 =Sheet1!R27 =Sheet1!R28 =Sheet1!R29 =Sheet1!R30 =Sheet1!R31
I want to do conditional formatting over the entire table for when data from column R and column C of the same row are equal and >0.
For example;
When Sheet1!R7 is equal to Sheet1!C7 and >0, color the sheet 2 table (that has the link) red.
When Sheet1!R20 is equal to Sheet1!C20 and >0, color the sheet 2 table red and so on.
I would also like to repeat the process with a different colored fill if R == L and >0 but I can just use the same formula once I know how.
My attempt was =AND(Sheet1!R7=Sheet1!C7,Sheet1!C7>0).
This works for the single cell, but I'd like a way to do the whole table at once.
Any help is appreciated, thanks.
EDIT for clairty:
*I'm sure I'm not explaining it too well.
To put it simply, I have 2 columns of numbers, let's say A1:A169 and B1:B169.
I want to take the larger number from A and B for each row (A10 vs B10 etc, I used MAX function for this) and dump the output in column C.
I then aim to color code column C based on whether the number comes from column A or B. Red for A, yellow for B (no color for <0).
So far I have achieved all of this, I have the data sitting in a column color coded.
My problem comes in that I want to have the 169 numbers in column C in a more readable format, I.E. in a 13x13 grid table. I don't know how to do this and keep the color coding!*
I suppose I can offer you some possible solution.
Lets say you have sheet1 and sheet2. In sheet2, you have links to
sheet1 as you mentioned. And my understanding is that you want to color
the sheet2 (the entire table?) as red if a certain condition is met.
This is how it might be done.
In sheet 2, create a formula for a cell which reflects your condition. Lets say that is =IF(Sheet1!A1="foo", 1, 0). You can add your AND conditions in that if statement. So that cell will contain 1 if the condition is met and 0 if not met.
Select the range of cells in sheet2. Click conditional formatting. Select "use a formula to determine which cells to format". Enter the condition for the calculated value in sheet2. For example, in sheet2, my cell G1 is the result of the formula =IF(Sheet1!A1="foo", 1, 0). So if the value of G1 is 1 then I want to color the range Red.
So in essense, we are using a formula to calculate the value of a cell and using that value
as a condition to format a range of cells in Sheet2.
Hope this helps.

Resources