Changing font properties of multiple cells based on one cell's value - excel

I'm putting to good use one of the Excel posts on Conditional Formatting, but I'm having trouble applying it to multiple cells. I have a row of cells:
F4;G4;H4;I4;J4
in which G4 is a Yes/No dropdown list (these values come from another sheet). I tried:
Conditional Formatting > New Rule > Use a formula to determine which cells to format
in the Format values where this formula is true I inserted =(G4="No") and it would apply bold + gray + strikethrough to the row of cells mentioned above (including G4).
Problem: when I change the G4 value to No, only the first cell - F4 - changes.
What am I doing wrong?

As mentioned by #hsan:
=$G4="No" should work
but also the "Applies to" range should be:
=$F$4:$J$4
Without the anchor ($) the references are relative, so F triggers the formatting because, relative to F, G is one column to the right and from F one column to the right shows No. It may be easier to see what is happening if, with the “wrong” formula (but the same Applies to range of F:J) you change the content of J4 to No. I4 should now be formatted bold+grey+strikethrough.
Maybe think of the CF as rastering through the specified range, so where that is =$F$4:$J$4, it starts in F4 and considers “does G4 equal No?” then steps to G4 and asks “does H4 equal No?” – and so on.
With the anchor, the comparison is against ColumnG at every step in the cycle.

Related

Conditional Formatting Depending on Text In Separate Cells in Excel

I'm trying to have one column change color (individual cells in that column, rather) depending on if there is text in a different cell in the same row. I've tried using something along the lines of =IF(($B1<>""), TRUE, FALSE) and that works, but when I try to copy that formatting to the rest of the column, the cell number that the formula references stays the same, so every cell in column A will reference cell B1 instead of changing the reference cell to B2, B3, etc... on down the column.
The problem with your formula i'm assuming is the $ sign which is an absolute reference. So if you use $B1 in your formula, you're saying that you need to always compare against the value in column B.
using this formula should probably work for you:
=IF(B1<>"", TRUE, FALSE)
But it also depends on the range that you're applying this conditional-format on.
TIP:
You don't even have to use the IF function, B1<>"" returns TRUE or FASLE by default.

Excel Conditional Formatting with updating formula

I have a matrix in excel (pictured below) that I need the following conditions for:
(1) A cell should be orange if a time fraction and Tj are provided on the same row, AND a Ball name is provided on its respective column
(2) A cell should be blue if, on the same row, any previous current input is <= .5* the first current input on the same row, regardless of if a ball name is provided
(3) A cell should be blue if no time fraction or Tj are provided on the same row, or if no ball name is given in its respective column
(4) The cells must default to blue when nothing is entered
At the moment, the cells are filled blue, so I understand that I need to only format when the cells should become orange, but I'm having some trouble working out the logic for conditional formatting, and as its a large table, I would like to avoid having to enter a conditional format for each individual cell.
Is there a way to say, for instance, (cell) = AND(tfrac <> "", tj <> "", Ballname <> "") format(orange), and then have the row/column numbers change for each cell, to that cell's respective column/row letter/number? Thanks!
If you are new to conditional formatting, you can follow this answer I gave to a different question: Is it possible to have excel highlight cells that don't conform to my desired format (ex. date as 6.2.2021 vs the desired 6/2/2021)? which will show you how to go about it.
As to the actual conditional logic for the formula that will be used, I would try something like:
=AND($time<>"", $tj<>"", ballname="what_you_want")

How to mark column value found False as zero | Excel | Conditional formatting |

I have a scenario where i want to mark the value as zero if found to be FALSE
Below is my table of data
in above image if you see the column 4 => cell C4 as one 'FALSE' value and correspond to that B4 cell as Blank value
i need to set that B4 value to zero.
Note : need to search the column 4 to find false keyword and correspond to that the B column cell value is blank it need to be set as numeric value Zero
how to do it using conditional formatting
my below code
=ISNUMBER(C4='FALSE' then B4 set to zero)
My first post, so be gentle please.
I am pretty sure that you could do that with conditional formatting, but I can think of simpler options. Is it required that you use conditional formatting, or do you need to get it done?
You could use Find & Replace functionality. Just select the range - which will be the whole column or part of it in your case, click Ctrl+H, go to the second tab (find and replace), leave the find field blank and write number 0 in replace field, then hit replace button until you feel all is done.
You could do that with a function as well, but I think that should do the job. I will check this post tomorrow as well, so feel free to comment.
I am not sure if conditional formatting can set a value. Conditional formatting as the name suggest is used to set the "Formatting".
To address your need, here is what I would do:-
Create a new column called "RollNumber" and rename the old one as "Old RollNumber"
In the new column, i.e. cell B2 type the formula =IF(ISNUMBER(C2),C2,0)
Copy the formula through to the bottom of the table (now this will apply to all)
Before hiding column C
Hide column C this will hide the "Old RollNumber" column
After hiding the column
Hope that helps.

Replicating conditional formatting in Excel

I'm having trouble using Conditional Formatting in Excel. No problem with setup for one row, but no luck replicating it to the rest of the worksheet.
A B C D
1 MATCH_RESULT CODE DESCRIPTION CHECKUP
2 #N/A A1 Chair #N/A
3 #N/A B1 Window #N/A
4 2 C1 Table #N/A
The goal is to identify if column A is filled with value #N/A (default error message for MATCH function). If it is, cells in columns - A, B, C - ONLY ON THE SAME ROW should be formatted (with color red). I.e. as per example, A2:C3 should be formatted.
This is working for me, however just for the first row and I fail to correctly replicate this downwards.
I'm selecting A2:C2 -> Conditional Formatting -> New Rule -> Use a formula to determine which cells to format.
I will end up with the formatting setup such as:
Formula: =$A$2=$D$2
Applies to: =$A$2:$C$2
A2 through C2 will be formatted, as expected (due to A2=D2). However I can't replicate the same thing on next rows. Format painter function will expand the current functionality so that still A2=D2 match is looked at for formatting other rows, instead of A3=D3 and so on.
Pretty sure the key is in $, but nothing has worked yet. Also pretty sure Excel allows just one cell in column D to be populated with value #N/A for comparison.
You have three issues, first your range is (part of) a single row =$A$2:$C$2. Try selecting ColumnsA:C before adding the rule, or change Applies to to:
=$A:$C
Second, you have anchored the row references in your formula. The 'style' should be:
=$A1=$D1
However your third issue is that comparing errors (#N/A resulting from a function) returns ... #N/A (so I don't know how you managed to get even a single row to work, since CF needs a TRUE result to trigger).
Maybe try:
=AND(ISNA($A1),ISNA($D1))
Replace the formula part with
=iserror($A2)
you may need to remove the $ manually.

Excel Conditional Formatting, Referencing 2 cells to the Right with conditions

I have a list of students who are between the ages of 3 and 5. lets say column A has the code, Column D has the childs age & Column F has their age group (3-5) If their age exceeds the age group then the Cell in column A will highlight Red. I am just not sure how to write this code correctly, all of the combinations i have tried come up with an error or just don't do anything.
IF(OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),0,7)="3-5" & (OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),0,4)>5 {THEN FILL CELL RED} {ELSE NO FILL}
In the first part of the statement you are checking whether the cell 7 columns across = "3-5". You don't need to use offset for this, you can just reference the cell 7 across directly.
So if you're applying the conditional formatting to A1 that part of the formula would just be =IF(H1="3-5",{then},{else}).
If you just want TRUE or FALSE as the answer you don't need the IF statement, so this shortens to: =H1="3-5",
If you're applying the conditional formatting to a range instead of just an individual cell, say A1:B10, then you write the formula for the cell in the top left of the that range. So for A1:B10 you would still you the same formulae as above.
For the second part of the statement, using the same logic as above, you get: =E1>5
To check both statements together you need to wrap them in the =AND() function, giving you this as the final formula for your conditional formatting:
=AND(H1="3-5",E1>5)
By using the AND function I can achieve the desired result without cell references moving if a cell is relocated.
=AND(OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),0,7)="3-5yo",OFFSET(INDIRECT(ADDRESS(ROW(),COLUMN())),0,4)>5)

Resources