Applying colors to Subtotal rows according to the Subtotal level in Microsoft Excel 2010

In this article, we will learn how we can apply the colors to subtotal rows according to the subtotal level in Microsoft Excel 2010.

Subtotal: - This option is used to calculate rows of related data quickly by inserting subtotals and totals.
 
img1
 
Before applying the colors to subtotal rows according to the subtotal level, we create the subtotal in data.

Let’s take an example to understand how we apply colors to subtotal rows according to the subtotal level.

We have data in range A1:E18 where column A contains month, column B contains year, column C contains Date, column D contains Customers' name and column E contains Revenue ($).

 
img2
 
Follow below given steps:-

  • Sort the data as per the year, newest to oldest.

 
img3
 
img4
 
To apply colors to subtotal rows according to the subtotal level, follow below given steps:-

By using 2 techniques:-

1. By changing Style.
2. By Conditional Formatting.

Changing Styles:-

  • Select the data, by pressing the key Ctrl+Shift+* on your keyboard.
  • Go to Data Tab, and click on the below bottom right corner on the arrow key.

 
img5
 

  • Settings dialog box will appear.

 
img6
 

  • Click on Apply Styles, and then click on OK.

 
img7
 
Conditional Formatting:-

  • Select Cell A1, press Ctrl+*, and select the data table.
  • From the Format menu, select Conditional Formatting.

 
img8
 

  • In the first argument, select Formula Is.
  • In the formula box, enter the formula =ISBLANK($D1).
  • Click Format, and select the desired formatting.
  • Click OK.

 
img9
 
img10
 
This is the way we can apply colors to subtotal rows according to the subtotal level in Microsoft Excel.
 
 

Comments

  1. I followed your instructions here and tried to apply it to several worksheets. However, sometimes the "Row level 2" option would not appear in the drop-down style list. What step am I missing?

  2. I like this tip...however, I found two things not explained...I needed to select the entire list area before I instructed Excel to Apply styles. Also, when I removed subtotals and then reapplied them, my shading always came out black, rather than the light color I applied. Any suggestions there?

  3. I followed your instructions here and tried to apply it to several worksheets. However, sometimes the "Row level 2" option would not appear in the drop-down style list. What step am I missing?

  4. I like this tip...however, I found two things not explained...I needed to select the entire list area before I instructed Excel to Apply styles. Also, when I removed subtotals and then reapplied them, my shading always came out black, rather than the light color I applied. Any suggestions there?

Leave a Reply

Your email address will not be published. Required fields are marked *

Terms and Conditions of use

The applications/code on this site are distributed as is and without warranties or liability. In no event shall the owner of the copyrights, or the authors of the applications/code be liable for any loss of profit, any problems or any damage resulting from the use or evaluation of the applications/code.