Hey all,
I have a tab delimited workbook which I am trying to write a macro for in order to speed up the data analysis process. In the document, the data for each trajectory is separated by spaces. In my net calculation, I use the following equation:
SQRT[(x2-x1)^2+(y2-y1)^2]
In order for this calculation to be a net distance versus and average distance x1 and y1 need to always be the first entry of each trajectory. However, I am a little confused on how to write the code so it can apply to all of the trajectories and reference the first data point for the respective trajectory and assign this to be x1 and y1. The way I have done this in python was by telling the code to start with the first entry below the delimiters %% unfortunately I am not sure if there is a way to do this in VBA or not. I've attached my workbook with the macro I'm currently edited. I know this can be somewhat confusing as it's not the easiest thing to explain so if I'm not being clear enough please feel free to ask questions.
Bookmarks