How do I loop through data to create a chart with multiple Series. Then, how to I repeat that to create multiple charts, using that same methodology for the rest of the data?
Below is a table of fictional data, but the order of indexing is real. That is, at a given speed, suction pressure is held constant, and discharge pressure is increased. A program calculates the required HP. The suction pressure is increased, speed is still constant, and the discharge pressure is incremented, and HP is calculated.
Then the speed is increased to the next interval, and the process is repeated. I'm trying to figure out a way to loop through the day and create a chart for each speed range. In reality, there are too many data points to create all of the series on one chart. So I want to create the charts based on speed. I'm struggling with how to lay out the format for this. Should i used nested FOR loops? Should I use a Case structure? What's the best way to go about it? I haven't learned enough about Chart objects yet to understand how to populate a series using VBA.
I'm not looking for someone to do this for me. I really want to learn, and I'm only asking for guidance. Thank you in advance.
Below is a table of fictional data, but the order of indexing is real. That is, at a given speed, suction pressure is held constant, and discharge pressure is increased. A program calculates the required HP. The suction pressure is increased, speed is still constant, and the discharge pressure is incremented, and HP is calculated.
Then the speed is increased to the next interval, and the process is repeated. I'm trying to figure out a way to loop through the day and create a chart for each speed range. In reality, there are too many data points to create all of the series on one chart. So I want to create the charts based on speed. I'm struggling with how to lay out the format for this. Should i used nested FOR loops? Should I use a Case structure? What's the best way to go about it? I haven't learned enough about Chart objects yet to understand how to populate a series using VBA.
I'm not looking for someone to do this for me. I really want to learn, and I'm only asking for guidance. Thank you in advance.
speed | Psuction | Pdischarge | Power |
100 | 100 | 500 | 750.00 |
100 | 100 | 505 | 756.25 |
100 | 100 | 510 | 762.50 |
100 | 100 | 515 | 768.75 |
100 | 100 | 520 | 775.00 |
100 | 100 | 525 | 781.25 |
100 | 100 | 530 | 787.50 |
100 | 100 | 535 | 793.75 |
100 | 100 | 540 | 800.00 |
100 | 100 | 545 | 806.25 |
100 | 100 | 550 | 812.50 |
100 | 105 | 500 | 750.00 |
100 | 105 | 505 | 756.25 |
100 | 105 | 510 | 762.50 |
100 | 105 | 515 | 768.75 |
100 | 105 | 520 | 775.00 |
100 | 105 | 525 | 781.25 |
100 | 105 | 530 | 787.50 |
100 | 105 | 535 | 793.75 |
100 | 105 | 540 | 800.00 |
100 | 105 | 545 | 806.25 |
100 | 105 | 550 | 812.50 |
100 | 110 | 500 | 750.00 |
100 | 110 | 505 | 756.25 |
100 | 110 | 510 | 762.50 |
100 | 110 | 515 | 768.75 |
100 | 110 | 520 | 775.00 |
100 | 110 | 525 | 781.25 |
100 | 110 | 530 | 787.50 |
100 | 110 | 535 | 793.75 |
100 | 110 | 540 | 800.00 |
100 | 110 | 545 | 806.25 |
100 | 110 | 550 | 812.50 |
200 | 100 | 500 | 875.00 |
200 | 100 | 505 | 881.25 |
200 | 100 | 510 | 887.50 |
200 | 100 | 515 | 893.75 |
200 | 100 | 520 | 900.00 |
200 | 100 | 525 | 906.25 |
200 | 100 | 530 | 912.50 |
200 | 100 | 535 | 918.75 |
200 | 100 | 540 | 925.00 |
200 | 100 | 545 | 931.25 |
200 | 100 | 550 | 937.50 |
200 | 105 | 500 | 875.00 |
200 | 105 | 505 | 881.25 |
200 | 105 | 510 | 887.50 |
200 | 105 | 515 | 893.75 |
200 | 105 | 520 | 900.00 |
200 | 105 | 525 | 906.25 |
200 | 105 | 530 | 912.50 |
200 | 105 | 535 | 918.75 |
200 | 105 | 540 | 925.00 |
200 | 105 | 545 | 931.25 |
200 | 105 | 550 | 937.50 |
200 | 110 | 500 | 875.00 |
200 | 110 | 505 | 881.25 |
200 | 110 | 510 | 887.50 |
200 | 110 | 515 | 893.75 |
200 | 110 | 520 | 900.00 |
200 | 110 | 525 | 906.25 |
200 | 110 | 530 | 912.50 |
200 | 110 | 535 | 918.75 |
200 | 110 | 540 | 925.00 |
200 | 110 | 545 | 931.25 |
200 | 110 | 550 | 937.50 |
300 | 100 | 500 | 1000.00 |
300 | 100 | 505 | 1006.25 |
300 | 100 | 510 | 1012.50 |
300 | 100 | 515 | 1018.75 |
300 | 100 | 520 | 1025.00 |
300 | 100 | 525 | 1031.25 |
300 | 100 | 530 | 1037.50 |
300 | 100 | 535 | 1043.75 |
300 | 100 | 540 | 1050.00 |
300 | 100 | 545 | 1056.25 |
300 | 100 | 550 | 1062.50 |
300 | 105 | 500 | 1000.00 |
300 | 105 | 505 | 1006.25 |
300 | 105 | 510 | 1012.50 |
300 | 105 | 515 | 1018.75 |
300 | 105 | 520 | 1025.00 |
300 | 105 | 525 | 1031.25 |
300 | 105 | 530 | 1037.50 |
300 | 105 | 535 | 1043.75 |
300 | 105 | 540 | 1050.00 |
300 | 105 | 545 | 1056.25 |
300 | 105 | 550 | 1062.50 |
300 | 110 | 500 | 1000.00 |
300 | 110 | 505 | 1006.25 |
300 | 110 | 510 | 1012.50 |
300 | 110 | 515 | 1018.75 |
300 | 110 | 520 | 1025.00 |
300 | 110 | 525 | 1031.25 |
300 | 110 | 530 | 1037.50 |
300 | 110 | 535 | 1043.75 |
300 | 110 | 540 | 1050.00 |
300 | 110 | 545 | 1056.25 |
300 | 110 | 550 | 1062.50 |