How to Highlight Rows in excel based on a Formula - excel

I'm trying to highlight all rows that have been returned True by the following formula in excel: =$G131=$G132
In the above, if the details of G131 are equal to G132, then return True and Highlight entire row.

Select the row to be formatted;
On the ribbon select Home > Conditional Formatting > New Rule;
In the new formatting rule, click Use a formula to determine which cells to format;
Under Format values where this formula is true, type the formula: =G131=G132;
Select the format color;
Click OK;

Related

Excel - Highlight Lowest Price in Each Row

I'm trying to highlight the lowest price in each row for a price comparison spreadsheet. I have been having trouble using conditional formatting and wonder if there is a macro and VBA that does the job. Can someone help me on how to highlight the lowest price in each row excluding cells with values of "0" or blank. Thank you so much!
-The spreadsheet goes from column A to P
-Column C,F,I,L,O are the prices.
-Some price cells do not have a value and are displayed as "$ - " in accounting format.
No VBA required:
Copy and paste the following into the Name Box (upper-left corner of Excel):
C:C,F:F,I:I,L:L,O:O
And the press the Enter key.
This will select those columns.
Now click on the Home tab of the Ribbon and then click on:
Conditional Formatting -> New Rule -> Use a formula to determine which cells to format
In the textbox that reads Format values where this formula is true enter:
=C1=MIN(IF($C1=0,2E+99,$C1),IF($F1=0,2E+99,$F1),IF($I1=0,2E+99,$I1),IF($L1=0,2E+99,$L1),IF($O1=0,2E+99,$O1))
Finally, click the Format button to select the color you want and then confirm.

Excel 2013: Condition Formatting with "IF(AND)" and "ISBLANK" and Data Validation Values

I have a formatted table and would like to use conditional formatting to shade in cells in a column (G) based on the following conditions:
Value in column (D) must say "Pending Decommission". The value is from a data validation list. If value does not match, do nothing.
If the above is true, then check to see if value in column (G) is blank.
If both are true, then insert value "Need Deletion Date" with the appropriate cell shading. If both or either one of the above is not true, then do nothing. I've tried a few nested IFs Ands and IsBlanks but can't seem to get it to work.
I current have this in the conditional formatting formula for cell G2. Of course I would like to apply this to the entire column.
=IF($D$2="Pending Decommission", IF(ISBLANK($G$2)=TRUE,"Insert Deletion Date",""),"")
You have two distinct requirements.
Assuming G2 is blank, filter on ColumnG to select banks and in G2 enter:
=IF($D2="Pending Decommission","Insert Deletion Date","")
and copy down to suit. If G2 is not selected by the filter, adjust the row number for the formula accordingly.
Select ColumnG, clear any existing Conditional Formatting from it and HOME > Styles > Conditional Formatting > Highlight Cells Rules > Equal To...:
Insert Deletion Date
and OK.
Adjust the formatting to suit. This will format any cell containing that text in ColumnG before the addition of the formula above.

Conditional formatting in excel sheet

I want to create an excel sheet using conditional format, where user can fill either cell A1(say) or A2(say). If he fill both then both cells becomes red.
You can create a new conditional formatting rule and use the "Use a formula to determine which cells to format" option. You can use the formula:
=CountA($A$1:$A$2)=2
When we use a formula to toggle conditional formatting, the formula has to return a TRUE or FALSE which is why we check if the result of this CountA formula returns 2. If both cells A1 and A2 have any value then CountA() will return 2 and the result will be TRUE

Excel - programm cells to change colour based on another cell

I am trying to create a formula for Excel whereby a cell would change colour based on the text in the previous cell.
So for example if cell B2 contains the letter X and then B3 is Y, I would like B3 to turn green.
Equally, if B2 contains X and B3 contains W I would like B3 to turn red.
Any ideas much appreciated!
Select cell B3 and click the Conditional Formatting button in the ribbon and choose "New Rule".
Select "Use a formula to determine which cells to format"
Enter the formula: =IF(B2="X",IF(B3="Y", TRUE, FALSE),FALSE), and choose to fill green when this is true
Create another rule and enter the formula =IF(B2="X",IF(B3="W", TRUE, FALSE),FALSE) and choose to fill red when this is true.
More details - conditional formatting with a formula applies the format when the formula evaluates to TRUE. You can use a compound IF formula to return true or false based on the values of any cells.
Select ColumnB and as two CF formula rules apply:
Green: =AND(B1048576="X",B1="Y")
Red: =AND(B1048576="X",B1="W")
Use conditional formatting.
You can enter a condition using any cell you like and a format to apply if the formula is true.

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