Results 1 to 10 of 10

Thread: Align Bar Chart With Corresponding Data In Source Range

  1. #1
    Junior Member
    Join Date
    Jul 2013
    Posts
    20
    Rep Power
    0

    Align Bar Chart With Corresponding Data In Source Range

    Hi

    This is a new thread continuing on from post - http://www.excelfox.com/forum/f2/dis...lot-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
    Attached Files Attached Files

  2. #2
    Junior Member
    Join Date
    Jul 2013
    Posts
    20
    Rep Power
    0
    bump

  3. #3
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    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?
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  4. #4
    Junior Member
    Join Date
    Jul 2013
    Posts
    20
    Rep Power
    0
    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

  5. #5
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Not sure why you are not sticking to the same thing. Check this for example.
    Attached Files Attached Files
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  6. #6
    Junior Member
    Join Date
    Jul 2013
    Posts
    20
    Rep Power
    0
    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

  7. #7
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    No, it's just one chart.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  8. #8
    Junior Member
    Join Date
    Jul 2013
    Posts
    20
    Rep Power
    0
    Got it...thankyou

  9. #9
    Junior Member
    Join Date
    Jul 2013
    Posts
    20
    Rep Power
    0
    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

  10. #10
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Based on the width of your column, you just place the chart appropriately, and adjust the width of your columns.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

Similar Threads

  1. Replies: 1
    Last Post: 05-03-2013, 04:41 PM
  2. Replies: 2
    Last Post: 04-26-2013, 04:59 PM
  3. Replace Pivot Table Source Range with New Address VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 1
    Last Post: 04-25-2013, 07:51 PM
  4. Replies: 2
    Last Post: 02-29-2012, 08:24 PM
  5. Get Chart's Source Data VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 2
    Last Post: 11-24-2011, 07:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •