By default, Excel provides the Conditional Formatting feature for us to complete this problem, please do as follows:
1. Select the data range that you want to highlight every nth row.
2. Click Home > Conditional Formatting > New Rule, see screenshot:
3. In the New Formatting Rule dialog box, click Use a formula to determine which cells to format option from the Select a Rule Type: list box, and then type this formula =MOD(ROW(),8)=0 into the Format value where this formula is true text box,
Tips: with above formula, you can highlight every fourth row in the range, you can change the number 4 to 3, 5, 6…for your need.
4. After entering the formula, then please click Format button to go to the Format Cells dialog, choose one color you like under the Fill tab.
If you want to highlight every nth column, please apply this formula: =MOD(COLUMN(), n)=0.
If you want to highlight every nth row, please apply this formula: =MOD(ROW(), n)=0.