I got tasked to create a diagram that visualizes the results of the last 5 subjects that get tested. Each subject gets tested in 5 different points, and all of them have the same limit value that should also be represeneted in a graph. Let me use a dummy table to explain:
SUBJECTS | point1 | point2 | point3 | LIMIT1 | LIMIT2 |
---|---|---|---|---|---|
A | 0,2 | 0,1 | 0,1 | 1 | -1 |
B | 0,3 | -0,2 | 0,2 | 1 | -1 |
C | 0,4 | 0,2 | 0,3 | 1 | -1 |
D | 0,3 | 0,7 | 0,4 | 1 | -1 |
E | 0,1 | 0,1 | 0,5 | 1 | -1 |
F | 0,4 | -0,4 | 0,6 | 1 | -1 |
This table is evergrowing, where new subjects are added everyday (this is already coded in vba). The number of points are always the same and the number of limits too. From this table what I have to do is plot a line chart with three lines to each “point”. Only taking the last 5 rows (in this case from row B to row F).
In each of the subjects diagrams both limits should always be represented along side the values to one of the points. In the following an example chart for point 1:
chart
I know how to this without vba, by using the offset function. But for some reason most functions are not working with me. So I really need to do it using vba. Problem is I have no clue how to select the last 5 of a dynamic table. Any help?
Tomás is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.