+ Reply to Thread
Results 1 to 12 of 12

Changing bar graph colours based on score peercentages

  1. #1
    Registered User
    Join Date
    05-18-2008
    Posts
    54

    Smile Changing bar graph colours based on score peercentages

    Hi there

    I have a whole heap of data for my students, that I am gathering from their assessment results. I have created a chart that shows their results as a percentage. What I want is to show results over 80% as blue, exactly 80% as green and below 80% as red.

    Seeing though I am a VBA numpty, I was wondering if there is someone who knows how to do this.

    Thankyou in advance

    Matt

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    No need for VBA.
    You can create conditional charts by using multiple series and some cell based formula.

    http://peltiertech.com/Excel/Charts/...nalChart1.html
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    05-18-2008
    Posts
    54
    Hi Andy

    Thanks for that. Have already seen that one actually. I think I need to explain further.

    The graph that has the student results is being feed from a table which is being updated from an Input Form (excel). Therefore the cells that have the data already have lookup formulas in them, so I am not sure how to incorporate the formlas required for the chart colouring (as per you link) with the formulas I already have in the cells.

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    Can you post an example of what you currently have.

  5. #5
    Registered User
    Join Date
    05-18-2008
    Posts
    54
    Hi Andy
    Sorry can't actually send you the files, there are a number of workbooks, all interacting, without one the others wont update thus sed data to the graphs.

    Matt
    Attached Files Attached Files

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    I understand you can not post confidential information but the issue here is your existing formula.

    Can you put together some dummy data and the formula that the chart is based on.

  7. #7
    Registered User
    Join Date
    05-18-2008
    Posts
    54
    Hi Andy

    I have created a dummy. Its a cut down version of what I am working on but the principle is the same. A graph is being feed from a small table which is indexing from a nother table. The graph data changes when you change the cell B30 from 1 to 4 to access the different assessments.

    The bars in the graph need to change colour based on the percentage.

    Hope this helps a bit more, to show what I am attempting

    Thanks

    Matt
    Attached Files Attached Files

  8. #8
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    Thanks for the revised file, makes it much clearer.

    You just need to base the conditional tests on the indexed values.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    05-18-2008
    Posts
    54
    Andy

    Thankyou so much, you're a champion. I do have another problem, but will save it for another day.

    Matt

  10. #10
    Registered User
    Join Date
    05-18-2008
    Posts
    54
    Silly question now.

    How do I change the colours. Where are they being referenced from?

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,430
    The colours are not referenced anywhere.

    The chart contains 3 series, each formatted as you described.
    The formula I added sets each point to either the value or NA(), which causes 2 of the columns to be surpressed.

    The series have been formatted to overlap each other completely so only 1 column is visible for each point.

    The article I linked to describes how to set up the chart.

  12. #12
    Registered User
    Join Date
    05-18-2008
    Posts
    54

    Smile

    I now understand.

    Thanks again

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1