Microsoft Excel – Formatting of Subtotals

I was demonstrating subtotals to a client today and she wanted to know how to format all the subtotal rows in bold with a different background cell colour. The workbook we were using had Counts for the subtotal.

In the example below, I have created subtotals based on a count of how many of each product have been ordered. The subtotal text is in column C.

We selected the data area including the subtotals, then went to the Home tab and in the Styles group, from the Conditional Formatting dropdown, selected New Rule. We then clicked Use a formula to determine which cells to format. The formula we typed in was =RIGHT($C1,5)=”Count”. We then clicked Format. On the font tab, we selected Bold and on the Fill tab, we selected a background colour. We then clicked OK twice. The subtotal rows were formatted accordingly.


The RIGHT function selects the rightmost xxx characters in a string, where xxx is the second argument in the function. The result looks like below:

If we had used the Average function in our subtotals, the formula in the Conditional Formatting box would have looked like =RIGHT($C1,7)=”Average”.

Find out more about our Microsoft Excel training Sydney, Australia.

Find out more about our Microsoft Excel training London, UK, or our Microsoft Excel training Dorset, Hampshire, Wiltshire area.

About jdonbavand

I am a trainer of Microsoft Office, Microsoft Project and Crystal Reports. I have called my blog "If Only I'd Known That...." because I hear it so many times in training sessions. In fact, if only I had a £100 (or 150 Aussie dollars)for every time someone says "If only I'd known that." ....
This entry was posted in Microsoft Excel, Microsoft Excel 2007, Microsoft Excel 2010, Microsoft Excel 2013, Microsoft Excel 2016 and tagged , , . Bookmark the permalink.

One Response to Microsoft Excel – Formatting of Subtotals

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s