PDA

View Full Version : Align Bar Chart With Corresponding Data In Source Range



regc
08-04-2013, 06:54 AM
Hi

This is a new thread continuing on from post - http://www.excelfox.com/forum/f2/display-a-custom-benchmark-line-across-graph-plot-area-1291/
I will need VBA for the following please
I require the Bars to be displayed after looking at the Scores in G14:P14 ( I have placed a dummy bar for demonstration).The Columns can be hidden depending on what needs to be visible..
There are Score markers from 0 -50-100 which will remain static.Can the Benchmark Line look at E4 and place the Line % in Red on the graph area
I need to then have a code for protection for cells G2:P23.I will use a commandbutton to protect/unprotect saying protect/unprotect.The sheet will protect on closing of workbook

Not sure if possible but will be good if achievable

Thanks

Regc

regc
08-05-2013, 07:18 PM
bump

Excel Fox
08-05-2013, 08:14 PM
Why do you want to do this in this peculiar way, and not use the bar chart that you had worked on in the other thread?

regc
08-06-2013, 03:36 AM
The bar chart in the other thread is very good but I want to protect the sheet.There is mention in post #14 in that thread that if I want to protect the sheet and hide/unhide columns I would need to do this in VBA code.

Is it possible to achieve this using VBA?

Thank you

Reg

Excel Fox
08-06-2013, 05:53 AM
Not sure why you are not sticking to the same thing. Check this for example.

regc
08-07-2013, 05:53 AM
Hi Excel Fox

That is very good.Thanks that does exactly what I wanted

Did you create 2 charts and for the Line Benchmark did you remove all borders,gridlines,legend etc..etc...I am just trying to workout how you created

Thanks

Reg

Excel Fox
08-07-2013, 06:09 AM
No, it's just one chart.

regc
08-07-2013, 01:23 PM
Got it...thankyou

regc
08-08-2013, 06:52 PM
I have it all working except that when I hide columns the bars lose there alignment to there corresponding score...how do I keep the bars aligned with the score when hiding columns

Cheers

RegC

Excel Fox
08-08-2013, 07:13 PM
Based on the width of your column, you just place the chart appropriately, and adjust the width of your columns.