Tool: Microsoft Excel 2007
Purpose: as a developer, you also need to write documents and collect statistics from time to time. In Excel tables, especially tables that need to be printed out, we often need to make the background color between rows different, so that each row can be recognized more easily. The detailed steps are listed below.
1.Select the row and column to be filled, and choose Home> Conditional Formatting> highlight cell Rules> more rules.
2.On the displayed page, we can customize a rule and the format to be applied.
In rule type, select use a formula to determine which cells to format. The rule description "format values where this formula is ture" means that we will fill in a function below. When this function is true, the format we define will be applied.
3.Input Function = Mod (row (), 2) = 0. This function is used to determine whether the current row is an even number of rows. Click "format" to select the background color to be filled with even rows (for demonstration convenience, here I select bright orange ).
4.Click OK.
5.Now we have completed the required results. Further, if I want to customize the color for odd lines or apply the same color for multiple lines, I can flexibly apply the function:
Odd row: = Mod (row (), 2) = 1
Every n rows: = Mod (row (), n) = 0