Formatting Issues

How to Apply Conditional Formatting for Every 6th or 7th Row in Excel

Anum MushtaqAnum Mushtaq Nov 2, 2026 870 views

Question details

The user needs to set up conditional formatting to highlight recurring rows, specifically every 6th and 7th row to represent weekend days, beginning at a specific starting row instead of the top of the worksheet.

How to Apply Conditional Formatting for Every 6th or 7th Row in Excel
Product
Excel
Device & OS
not provided
Scenario
Applying a repeating highlight pattern to a dataset to visually separate weekend rows from weekdays within a custom selected data range.
Observed behavior
The user wants a precise formula applied to a custom data range so that the highlights accurately reflect every 6th and 7th row based on the defined starting point.
Before you start

Identify the exact starting row number of your dataset, as the MOD formula must be adjusted based on this first row to ensure the correct sequence is highlighted.

Solution 1Recommended

Use the MOD function for a 7-row repeating pattern

This is the most effective way to highlight specific recurring rows, such as a two-day weekend block, starting from a custom row number.

By combining the MOD and ROW functions, you can create a repeating pattern that highlights specific rows regardless of where your data begins.

For example, if you want to highlight a repeating block of two rows (like weekends) in a 7-day sequence starting at row 10, the formula =MOD(ROW()-10,7)<=1 will calculate the offset and highlight the first two rows of every 7-row block.

1
Select your target data range

Click and drag to select the entire range of cells where you want the conditional formatting applied (e.g., A10:F100).

2
Open Conditional Formatting

Navigate to the Home tab on the ribbon, click on Conditional Formatting, and select 'New Rule' from the dropdown menu.

3
Enter the formula

Choose 'Use a formula to determine which cells to format'. In the formula box, enter =MOD(ROW()-10,7)<=1 (replace 10 with your actual starting row number if different).

4
Set the cell formatting

Click the 'Format' button, switch to the 'Fill' tab, select your preferred highlight color, and click OK to apply the rule.

Use the MOD function for a 7-row repeating pattern
Formula Adjustment: If your weekend falls on the 6th and 7th days rather than the 1st and 2nd days of your data block, adjust the logic to =MOD(ROW()-start_row, 7)>=5.
Efficient Data Formatting

Easily Highlight Custom Rows with WPS Spreadsheet

WPS Office Spreadsheet provides advanced yet intuitive conditional formatting tools. You can effortlessly apply complex formulas to highlight recurring rows, schedule weekends, or track alternating data points.

  1. 1. Open your file in WPS Spreadsheet: Launch WPS Office and open the workbook containing your schedule or dataset.
  2. 2. Select the data range: Highlight the specific rows and columns you wish to apply the formatting to.
  3. 3. Access Conditional Formatting: Go to the Home tab, click 'Conditional Formatting', and select 'New Rule'.
  4. 4. Apply your formula: Choose 'Use a formula to determine which cells to format', enter your MOD formula, pick a highlight color, and click OK.
100% compatible with Microsoft Excel conditional formatting rules and formulas.Effortlessly highlight recurring rows like weekends using the built-in rule manager.Lightweight software that runs smoothly even when formatting massive datasets.Free to use with a familiar, easy-to-navigate user interface.
microsoft office alternative - wps office

Frequently Asked Questions

How do I highlight every Nth row starting from row 2?

Use the formula =MOD(ROW()-2, N)=0 in your conditional formatting rule, replacing N with your desired interval (e.g., 5 for every 5th row).

Can I apply conditional formatting to highlight entire columns instead of rows?

Yes, you can highlight columns by replacing the ROW() function with the COLUMN() function in your MOD formulas. For example, =MOD(COLUMN()-1, 7)=0.

Why is my conditional formatting formula highlighting the wrong rows?

This usually occurs if the starting row referenced in your MOD formula does not perfectly match the top row of the range you currently have selected. Ensure your selection and formula offsets are aligned.