Solved

Shade single bar in a bar chart...

Posted on 2014-04-21
2
252 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 (Microsoft MVP / EE MVE) 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

Independent Software Vendors: 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

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
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…
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.

717 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