parsed.org

Tips by tag: formula

Row Banding with Conditional Formatting by xinu on Aug 27, 2005 09:05 AM

To add odd-even row coloring to a spreadsheet, highlight the block of rows that you want colored and enter a conditional formatting formula:

  1. Select the cells you want to format.

  2. Access the menu: Format > Conditional Formatting...

  3. Change the condition dropdown to Formula is.

  4. Click the Format... button and select the formatting you want.

  5. Enter the appropriate formula below:

    =MOD(ROW()-Rw,N*2)+1<=N
    

    For example:

    =MOD(ROW()-2,1*2)+1<=1
    

Where Rw is the first row to be formatted and N is the number of rows for banding. If you want to alternate, set N to 1. For even banding, change the conditional to >N instead of <=N.

excelformulamicrosoftui
RSS