allstarrunner
New Member
- Joined
- May 29, 2012
- Messages
- 34
Hi, I have had a terrible time trying to find the vba code I want, so I am hoping someone here can help me out:
I have a stacked bar chart which is referencing the data in colums A and B; what I what to do is have all of the colors on the stacked bar chart be different shades of one color. For example, starting at the bottom of the stacked bar and moving up I want it to go from a blue I specify to a ligher one, so each stacked element is a little more transparent or lighter blue. I can't do this manually, (at least I don't think), because the number of data points and "stacks" could differ (since this is built inside a macro which references a dynamic range). I'm thinking, but not smart enough to write the code, that if I could have the vba say something to the effect of "series 1 = color of cell A1 on "sheet 2", if Series 2, then use color A2 on "sheet 2", and so on.
I am sorry I don't have any code to show as I really have non idea where to start on this one....Any help would be greatly appreciated! Thanks!
I have a stacked bar chart which is referencing the data in colums A and B; what I what to do is have all of the colors on the stacked bar chart be different shades of one color. For example, starting at the bottom of the stacked bar and moving up I want it to go from a blue I specify to a ligher one, so each stacked element is a little more transparent or lighter blue. I can't do this manually, (at least I don't think), because the number of data points and "stacks" could differ (since this is built inside a macro which references a dynamic range). I'm thinking, but not smart enough to write the code, that if I could have the vba say something to the effect of "series 1 = color of cell A1 on "sheet 2", if Series 2, then use color A2 on "sheet 2", and so on.
I am sorry I don't have any code to show as I really have non idea where to start on this one....Any help would be greatly appreciated! Thanks!