Sep 20 2023 05:35 PM
Hi team.
Help please... I have a roster spreadsheet that shows a year attendance. Each day is a new column.
I have a list/legend of conditional formatting for what the employee is doing on each day. For example: D = day shift. SL = sick leave. T = training etc.
The list of conditional formatting is in a legend below the roster where we have managed the rules and have the different codes and colours etc.
How do I apply this list to the whole roster please?
Sep 20 2023 11:39 PM
SolutionHi @Christine_Jones,
to apply a list of conditional formatting rules to a whole roster, you can use VLOOKUP:
=VLOOKUP(A2,Legend!$A$2:$B$10,2,FALSE)
Where A2 is the cell in the roster that you want to apply conditional formatting to, and Legend!$A$2:$B$10 is the range of cells in the legend that contains the list of conditional formatting rules.
This will apply the conditional formatting rules from the legend to the entire roster.
Here is an example of a conditional formatting rule for a roster:
=VLOOKUP(A2,Legend!$A$2:$B$10,2,FALSE)
Where A2 is the cell in the roster that you want to apply conditional formatting to, and Legend!$A$2:$B$10 is the range of cells in the legend that contains the list of conditional formatting rules.
This rule will look up the value in cell A2 in the first column of the legend, and then return the value in the second column of the legend. If the value in cell A2 is not found in the legend, then the rule will return a blank value.
You can create multiple conditional formatting rules for your roster, and each rule will be applied in the order that you create them.
You can also use the AND and OR logical operators to combine multiple conditions in a single conditional formatting rule. For example, the following rule will apply conditional formatting to cells that are both empty and contain the value "D":
=AND(A2="",VLOOKUP(A2,Legend!$A$2:$B$10,2,FALSE)="D")
Please click Mark as Best Response & Like if my post helped you to solve your issue.
This will help others to find the correct solution easily. It also closes the item.
If the post was useful in other ways, please consider giving it Like.
Kindest regards,
Leon Pavesic