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
Solved

Shade single bar in a bar chart...

Posted on 2014-04-21
2
245 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:
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

INDEX and MATCH can be used to great effect to replace HLOOKUP and VLOOKUP as it does not have the limitation of needing the data to be sorted so that the reference value is in the first column or row. It also has the ability to perform a bi-directi…
Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

860 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