Forum Discussion
Desno13
Dec 31, 2020Copper Contributor
I am trying to copy and paste data from a range of columns VBA
Hello, so I am new to VBA and am struggling to perform a particular task. I have performed some machine learning on some stock data and have transferred them to excel. But the thing is this data can ...
Desno13
Dec 31, 2020Copper Contributor
Thanks for this. So yes this is what I want but with some adjustments. I have included the comments in the excel sheet and also a sample of my data.
But thank you for this!
JMB17
Jan 05, 2021Bronze Contributor
Sorry it took me a bit to get back to you. I think I understand better now what you want to do - the columns you want to copy are entirely based on position (relative to the date column).
See attached (Module 1). But, note that I'm making some assumptions about which row the "Date" header will appear in (I'm assuming Row 2, but change if necessary). Also, I'm assuming the macro should run on the active sheet and is copying the data to a new worksheet.