Programmer's MS Office experience 2: Excel uses the same background color

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.