All,
I have found a few ways to do this online that involve changing the cell names in the series color name and then using VBA to have it match the bar chart name but I am trying to find a way that skips that altogether. Let me back up a bit:
I am using Excel 2010. I have 1 of 4 waterfall charts that has roughly 96 points of data. I'd like to very quickly be able to utilize VBA to format the bars based on the series name. For example, in the X-AXIS say it's Big, Tall, Small, Large and the corresponding values are 3, 4, 5, and 6. I want to be able to use VBA to have the BIG series name bar to always be blue, TALL series name bar to be RED, SMALL series name bar to be ORANGE and the LARGE series name bar to always be YELLOW.
Like I said, I found a few websites that have one go into the source data and change the colors of the cells to what you want the bar charts to be but I am trying to avoid that because I don't want my source data to have a bunch of colors in the cell. If anyone can help, please let me know. I did record a macro that does do most of the formatting I want at least in the sense of selecting a bar in, putting a .75 weight border line around it and then giving it a specified color, but with this many points, I'd prefer to see if I can automate it based on the series name.
Here is the recorded macro code:
Also, if the code can be modified above to make it so that I don't have to press Ctrl+Shift+P twice to get it to fill the bar and then put the border on it, that would be awesome too.
Thanks for your time.
Bookmarks