Note: The other languages of the website are Google-translated. Back to English
English English

How to highlight all subtotal rows at once in Excel?

In Excel, we often add subtotals for a large worksheet to count or analyze the data, and the subtotal rows are formatted with bold font by default. But, sometimes, we need the subtotal rows to be stand out the crowd, so that we can view them quickly and intuitively. In this case, we can highlight all the subtotal rows with a desired formatting.

Highlight all subtotal rows with Go To Special function
Highlight all subtotal rows with Conditional Formatting
Highlight all subtotal rows with VBA code
Easily select and highlight all subtotal rows with Kutools for Excel

Highlight all subtotal rows with Go To Special function

As we all known, when we add subtotals for the data, the outline symbols will be displayed at the left of the worksheet as following screenshot shown:


Now, we can fold the outline and just leave the Total and Grand Total rows. And then apply formatting for these visible rows only. Please do with following steps:

1. Click outline level 2 to display the subtotals and Grand total rows only. See screenshot:


2. And then select these displayed subtotal rows, and click Home > Find & Select > Go To Special.


3. In the Go To Special dialog box, check Visible cells only option, see screenshot:


4. Then click OK button to close the dialog, and only the subtotal rows have been selected.


5. And then you can format them with a background color as you like by clicking Home > Fill Color.


6. At last, click outline level 3 in the left pane to expand the detail information, and the subtotal rows have been highlighted from the crowded data. See screenshot:


Select the entire row if cell contains specific value in Excel:

The Kutools for Excel's Select Specific Cells utility helps you easily select the entire rows based on specific cell values in Excel as the below screenshot shown.
Download and try it now! ( 30-day free trail)

Highlight all subtotal rows with Conditional Formatting

Conditional Formatting is a powerful feature in Excel, we can also use it to highlight all subtotal rows immediately.

1. Select your data range or whole worksheet which contains subtotal rows.

2. Click Home > Conditional Formatting > New Rule, see screenshot:


3. In the New Formatting Rule dialog box, click Use a formula to determine which cell to format, and enter this formula =ISNUMBER(FIND("Total",$A1)) into the Format values where this formula is true text box (A1 indicates the column that your subtotals are located, if the subtotals are in column C, you would use C1 instead of A1 in the formula ). See screenshot:


4. Then click Format button, in the popped out Format Cells dialog, choose one color you like to format the subtotal rows under Fill tab.


5. And then click OK > OK to close the dialogs, and the entire rows which contain subtotal values have been highlighted if you selected the whole worksheet.


Highlight all subtotal rows with VBA code

With the following VBA code, we can easily highlight the entire rows containing the subtotal and grand total values.

1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following code in the Module Window.

VBA code: highlight all subtotal rows in Excel

Sub FormatTotalRows()
'Update 20140318
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
    If Right(Rng.Value, 5) = "Total" Then
        Rng.EntireRow.Interior.ColorIndex = 6
    End If
    If Right(Rng.Value, 11) = "Grand Total" Then
        Rng.EntireRow.Interior.ColorIndex = 8
    End If
End Sub

3. Then press F5 key to run this code, and a prompt box will pop out to remind you select your data range.


4. And then click OK, the subtotal rows are colored by yellow and the grand total row is filled with blue.


Note: You can format the color you like by changing the ColorIndex in the above code.

Highlight all subtotal rows with Kutools for Excel

This section will recommend you the Select Specific Cells utility of Kutools for Excel. With this utility, you can easily select all rows which contain word "total" in specified column, and then specify a fill color to highlight them.

Before applying Kutools for Excel, please download and install it firstly.

1. Select the column contains word "total" you will highlight rows based on. Then click Kutools > Select > Select Specific Cells. See screenshot:

2. In the Select Specific Cells dialog box, please do as follows.

  • (1) select Entire row option in the Selection type section.
  • (2) in the Specific type section, select Contains in the drop-down list, enter Total into the box.
  • (3) Click the OK button

3. Now all subtotal rows are selected immediately. Please specify a background color in the Font group under Home tab in Excel to highlight them.

  If you want to have a free trial ( 30-day) of this utility, please click to download it, and then go to apply the operation according above steps.

Easily select and highlight all subtotal rows with Kutools for Excel

Related articles:

The Best Office Productivity Tools

Kutools for Excel Solves Most of Your Problems, and Increases Your Productivity by 80%

  • Reuse: Quickly insert complex formulas, charts and anything that you have used before; Encrypt Cells with password; Create Mailing List and send emails...
  • Super Formula Bar (easily edit multiple lines of text and formula); Reading Layout (easily read and edit large numbers of cells); Paste to Filtered Range...
  • Merge Cells/Rows/Columns without losing Data; Split Cells Content; Combine Duplicate Rows/Columns... Prevent Duplicate Cells; Compare Ranges...
  • Select Duplicate or Unique Rows; Select Blank Rows (all cells are empty); Super Find and Fuzzy Find in Many Workbooks; Random Select...
  • Exact Copy Multiple Cells without changing formula reference; Auto Create References to Multiple Sheets; Insert Bullets, Check Boxes and more...
  • Extract Text, Add Text, Remove by Position, Remove Space; Create and Print Paging Subtotals; Convert Between Cells Content and Comments...
  • Super Filter (save and apply filter schemes to other sheets); Advanced Sort by month/week/day, frequency and more; Special Filter by bold, italic...
  • Combine Workbooks and WorkSheets; Merge Tables based on key columns; Split Data into Multiple Sheets; Batch Convert xls, xlsx and PDF...
  • More than 300 powerful features. Supports Office/Excel 2007-2019 and 365. Supports all languages. Easy deploying in your enterprise or organization. Full features 30-day free trial. 60-day money back guarantee.
kte tab 201905

Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!
officetab bottom
Comments (2)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Only the text has been made bold - what about the number underpinned by SUBTOTAL formulae? That's what would make the data totals stand out.
This comment was minimized by the moderator on the site
Your answer isn't making bold the number that is underpinned by the SUBTOTAL formula
There are no comments posted here yet
Leave your comments
Posting as Guest
Rate this post:
0   Characters
Suggested Locations