Solved

Shade single bar in a bar chart...

Posted on 2014-04-21
2
248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 50

Accepted Solution

by:
Ingeborg Hawighorst 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 34

Author Closing Comment

by:Mike Eghtebas
ID: 40015298
Thank you.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

740 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