Hello All,
I am relatively new to writing macros. I have several excel files that have a time, displacement, voltage and current column. I need to calculate a velocity column. "Velocity" in cell E1. "mm/s" in cell E2. And "(B4-B3)/(A4-A3) in cell E3 and it needs to go all the way down for however many rows the data set has. Each file has a different amount of rows of data since these are time based data sets. I then need to graph the data titled "Velocity" with velocity on the y-axis and displacement on the x-axis. Then, current on a secondary y-axis and displacement on the x-axis. Then I need to add a trendline to the velocity graph with a moving average with a period of 5. Axis titles, legend, and graph title need to be added. The graph title should be "Job 8305 (NextLine) Motor Bridge Ramp Test (NextLine) (Name of the excel file)". Then, the velocity data series can be hidden from the graph and the legend so you only see the solid trendline.
I started writing the macro in portions by using the macro recorder but was not able to successfully add the trendline.
I attached 2 files. 1 File is a raw file, the next is a processed one which is how we want it to look when it is finished. Could someone help me to achieve this goal?
If the trendline part is too difficult to add, it can be left out if need be.
Thank you so much!!
Bookmarks