I want to turn a lot of data into a graph in Excel using VBA and I need your help!
At the moment, I have an Excel that looks like the following (I adapted some of the values):
These are only a 37 rows, but in reality this list goes on till row 9208 (this differs every time).
Column A shows the time and seconds. Will be the x-axis value.
Column B shows the voltage of a sensor and has only two options: around 4.13, the device closes and around a value of 5.13, the device opens.
Columns C and D are the values that I want to plot. It is temperature (y-axis)
If I scatter plot this, it becomes something like this:
However, I would like my graph to look more like this:
This means, that everytime the value of +-4.13 in column B changes into +-5.13, column A, C and D are cut and pasted into a new column. From that point, this should happen again. Column B should be used as “reset” for a new column, so that I can overlay each measurement. In this case, there are two temperature columns C & D, but sometimes these can be three or even up to six.
I do understand a little bit of vba, but I simply don’t know how to start. Can anyone help me to setup some code? Thank you very much! Don’t hesitate to ask additional questions.