I have a leaderboard representing sports teams that are automatically ranked into positional order 1 to 20 (see image).
This ranked order is also used as the legend (see image).
I display the data on a line chart as rank v date, which shows their positional change in fortune over the past 6 weeks.
No here is the problem:
The color of the line for the team ranked in position 1 is red, team 2 is blue, team 3 is green etc...
(Foolishly?) I manually colored all of the lines to represent their teams kit color a few weeks back, however as the teams have subsequently changed positions, they have adopted the colored line for that rank.
I have experimented to fix the data in specific rows on a spreadsheet, which works, but I'd like the ranked order to display in the legend and to coincide with the data lines (see image).
So I was wondering is there a way to use VBA to assign the color to a line based on the contents of a cell - I could manipulate the cells to contain text / number / icolor value etc. using a VLOOKUP.
I am able to compose some very clumsy text to re-color all of the cells by concatenating a load of text and pasting it into a macro, but I'd like a more elegant solution, say a macro triggered by a button to recolor the lines based on the contents of a range 20 cells.
Thanks in advance for any suggestions.
Poolio x
This ranked order is also used as the legend (see image).
I display the data on a line chart as rank v date, which shows their positional change in fortune over the past 6 weeks.
No here is the problem:
The color of the line for the team ranked in position 1 is red, team 2 is blue, team 3 is green etc...
(Foolishly?) I manually colored all of the lines to represent their teams kit color a few weeks back, however as the teams have subsequently changed positions, they have adopted the colored line for that rank.
I have experimented to fix the data in specific rows on a spreadsheet, which works, but I'd like the ranked order to display in the legend and to coincide with the data lines (see image).
So I was wondering is there a way to use VBA to assign the color to a line based on the contents of a cell - I could manipulate the cells to contain text / number / icolor value etc. using a VLOOKUP.
I am able to compose some very clumsy text to re-color all of the cells by concatenating a load of text and pasting it into a macro, but I'd like a more elegant solution, say a macro triggered by a button to recolor the lines based on the contents of a range 20 cells.
Thanks in advance for any suggestions.
Poolio x