Forum Discussion
Conditional Formatting Based on a Table
You can use a combination of formulas and conditional formatting rules to achieve the desired result.
Here is a summary of the steps:
Select the range of cells (the grey squares) that you want to apply the conditional formatting to.
Go to the "Home" tab in the Excel ribbon and click on "Conditional Formatting" in the "Styles" group.
From the dropdown menu, select "New Rule" to open the "New Formatting Rule" dialog box.
In the dialog box, select the option "Use a formula to determine which cells to format".
In the "Format values where this formula is true" field, enter the following formula:
=IF(INDEX(Table1,MATCH($A$1,Table1[Code],0),MATCH($B2,Table1[#Headers],0))="M",TRUE,FALSE)
Note: Adjust the formula according to your specific table range and cell references.
Click on the "Format" button and choose the desired formatting style for the cells (e.g., red fill color for M, white fill color for F).
Click "OK" to close the dialog box.
Please note that there may be slight differences in the user interface or menu options between Excel versions, but the general concept of conditional formatting based on a formula remains the same. By using this approach, you can dynamically apply the formatting based on the values in the table, without the need for external code or languages like HTML/JS/CSS.
The text and formulas was created with the help of AI.
Hope this will help you.