Solved

Shade single bar in a bar chart...

Posted on 2014-04-21
2
235 Views
Last Modified: 2014-04-22
The attached image shows a combination of line and bar chart. The named-range called CurrMthCol may contain numbers from 1 to 24 (a two year period).

In the attached image, because it contains Agust 2013 (or 8), its matching bar is shaded (filled) red.

For your consideration, Agust 2014 will be 12 + 8 or 20.

Question: Using VBA or whatever possible, how can I shade the bar matching the value in CurrMthCol?

Thank you.
CurrentMonthBar.png
0
Comment
Question by:Mike Eghtebas
2 Comments
 
LVL 50

Accepted Solution

by:
teylyn earned 500 total points
ID: 40013906
Hello,

the description of the data and layout is a bit unclear. Maybe you can post a sample file instead of  a picture.

What you want to achieve can be done without VBA, just using data layout. In the attached file you can see a stacked column chart from two series. The chart data is in two helper columns. A formula determines if the white bar has a value greater than 0 or the red bar has a value greater than 0.  You will need to figure out the logic for your situation, but we can help with that, of course.

Whenever the number in cell G2 changes, the red bar in the chart will shift its position.

chart
Let me know if this helps or if you need more assistance.

cheers, teylyn
redWhiteChart.xlsx
0
 
LVL 33

Author Closing Comment

by:Mike Eghtebas
ID: 40015298
Thank you.
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Drop Down List with Unique/Distinct Values (enhancing the Combo-Box with a few steps and a little code) David miller (dlmille) Intro Have you ever created a data validation list from a database field or spreadsheet column (e.g., Zip Codes or Co…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial demonstrates in Microsoft Excel how to consolidate your marketing data by creating an interactive charts using form controls. This creates cool drop-downs for viewers of your chart to choose from.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now