## Conditional formatting stacked bar chart in Excel

This tutorial, it introduces how to create conditional formatting stacked bar chart as below screenshot shown step by step in Excel.

#### Conditional formatting stacked bar chart

1. Create helper columns firstly. Select a cell next to you data, type this formula =(B2/SUM(\$B2:\$D2))*100, B2 is the cell you want to calculate its percentage in Project A， B2:D2 contains three parts of the Project A. then drag.

2. Then drag AutoFill handle over all cells to calculate the percentage of each value.

3. Now start creating the conditional formatting stacked bar. Select 100 column ranges next to the formula cells, supposing J2:DE5, click Home > Format > Column Width, and adjust the column width to 0.1, and click the OK button.

4. Keep the columns selected, and click Home > Conditional Formatting > New Rule.

5. In the New Formatting Rule dialog, select Use a formula to determine which cells to format from the Select a Rule Type section, then type this formula =COLUMNS(\$J\$2:J2)<=\$F2 into Format values where this formula is true text box.

Note: J2 is the first cell that in the selected column ranges. F2 is the first formula cell.

6. Click Format to the Format Cells dialog, under Fill tab, select one color. Click OK > OK to close the dialog.

7. Then apply the conditional formatting at the second time.

(1) In the New Formatting Rule dialog, select Use a formula to determine which cells to format from the Select a Rule Type section, type this formula =AND(COLUMNS(\$J\$2:J2)>\$F2,COLUMNS(\$J\$2:J2)<=(\$F2+\$G2)) into Format values where this formula is true text box, and click Format.

(2) Then in the Format Cells dialog, under Fill tab, select one color.

(3) Click OK > OK to close the dialogs.

8. Lastly, apply the conditional formatting at the third time.

(1) In the New Formatting Rule dialog, select Use a formula to determine which cells to format from the Select a Rule Type section, type this formula =AND(COLUMNS(\$J\$2:J2)>(\$F2+\$G2),COLUMNS(\$J\$2:J2)<=100) into Format values where this formula is true text box, and click Format.

(2) In the Format Cells dialog, under Fill tab, select one color.

(3) Click OK > OK to close the dialog.

Now the stacked bar chart with conditional formatting have been created.

You can add borders around them for well-look.

 Tip: If you are in trouble with remembering complex formulas, here the Auto Text tool of Kutools for Excel can save all formulas you used in a pane for you, then, you can reuse them in anywhere anytime, what you only need to do is change the references to match your real need.  Click for free download it now.

#### Other Operations (Articles) Related To Conditioanl Formatting

Count/sum cells by colors with conditional formatting in Excel
Now this tutorial will tell you some handy and easy methods to quickly count or sum the cells by color with conditional formatting in Excel.

create a chart with conditional formatting in Excel
For example, you have a score table of a class, and you want to create a chart to color scores in different ranges, here this tutorial will introduce the method on solving this job.

Search and highlight search results in Excel
In Excel, you can use the Find and Replace function to find a specific value, but do you know how to highlight the search results after searching? In this article, I introduce two different ways to help you search and highlight search results at the meanwhile in Excel.

Conditional formatting rows or cells if two columns equal in Excel
In this article, I introduce the method on conditional formatting rows or cells if two columns equal in Excel.

Apply conditional formatting for each row in Excel
Sometimes, you may want to apply the conditional formatting for per row. Except repeatedly setting the same rules for per row, there are some tricks on solving this job.

## The Best Office Productivity Tools

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

• 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 and Keeping Data; Split Cells Content; Combine Duplicate Rows and Sum/Average... 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...
• Favorite and Quickly Insert Formulas, Ranges, Charts and Pictures; Encrypt Cells with password; Create Mailing List and send emails...
• 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...
• Pivot Table Grouping by week number, day of week and more... Show Unlocked, Locked Cells by different colors; Highlight Cells That Have Formula/Name...

### 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!