How to highlight / fill every nth row or column in Excel?
It is easier for us to read the data in a large worksheet if highlight or fill every nth rows or columns. In Excel, Conditional Formatting is a powerful feature for us to deal with this task. Except the Conditional Formatting, today, I can introduce you a handy tool-Kutools for Excel to finish this job quickly and easily.
In this example, I will highlight every fourth row in the worksheet as following screenshot shown.
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(),4)=0 into the Format value where this formula is true text box, see screenshot:
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, see screenshot:
5. Then click OK > OK to close the dialogs, and every fourth row has been highlighted at once in the range.
1. Conditional Formatting is a dynamic feature, the shading will be adjusted automatically if you insert or delete rows.
2. If you want to highlight every nth column, please apply this formula: =MOD(COLUMN(),4)=0.
If you are not familiar with the Conditional Formatting utility, Kutools for Excel’s Alternate Row / Column Shading also can help you to highlight the rows or columns you need.
|Kutools for Excel : with more than 300 handy Excel add-ins, free to try with no limitation in 30 days.|
After installing Kutools for Excel, please do with the following steps:
1. Select the range that you want to highlight every nth row.
2. Click Kutools > Format > Alternate Row / Column Shading, see screenshot:
3. In the Alternate Row / Column Shading dialog box, please do the following operations:
A: Specify the columns or rows that you want to highlight from the Apply shading to section;
B: Choose shading methods you need, you can apply Conditional formatting or standard formatting for the rows or columns you need;
C: Select one color you like to shade under the Shade color drop down;
D: At last, specify the interval that you want to shade between two rows from the Shade every scroll box.
4. After finishing the settings in the dialog box, then click OK button, and you will get the following result:
1. If you choose Conditional formatting option in the dialog, the shading will be adjusted automatically if you insert or delete rows;
2. If you choose Standard formatting option, the shading will not be adjusted automatically as you insert or delete rows;
3. To remove the exiting shading, you can select the Remove existing alternate row shading option.
Sometimes, you need to shade two rows with two intervals alternately in the range which the above two methods will not work, with the Kutools for Excel’s Select Interval Rows & Columns feature, you can quickly solve this job. With it, you can select the number of rows or columns alternately first, and then fill them at once.
If you have installed Kutools for Excel, please do as follows:
1. Select the data range that you want to shade.
2. Then click Kutools > Select > Select Interval Rows & Columns, see screenshot:
3. In the Select Interval Rows & Columns dialog, choose the rows or columns that you want to shade from the Select section, and then specify the number of intervals and rows you need, see screenshot:
4. Then click OK, two rows at two intervals have been selected alternately, see screenshot:
5. Then click Home > Fill color to choose one color for shading the rows, see screenshot: