For example, to make a bar chart with the data in the table and change the color in 3 different groups (1 – 15, 15 – 30, 30 – 50).
Step 1: Sort the data in column B from smallest to largest, and then re-arrange the data by using the formula =IF(AND(C$1<$B4,$B4<=C$2),$B4,NA()) in column C, D and E;
Step 2: Select data X and Y, and click the Insert Tab from the ribbon;
Step 3: Click the Line with Markers in the Charts area;
Step 4: Click the chart to select X and Y columns, then move the mouse cursor to extend the data range B3:E14;
Step 5: Now the Line chart is colored based on value.
Step 6: Part of the line is gray, to change it to blue line, please double click and select blue color from the "Format Data Point" window.
Step 7: The line chart is now ready.