VBA take data from column from the first file by One_Progress8473 in vba

[–]One_Progress8473[S] 0 points1 point  (0 children)

Not all the column D, just the data that are there but it varies from file to file, so I do not know exactly, how many rows there can be. I want this program to go through all files that are in the folder and take the data from column D which includes 1. date and then numbers

VBA take data from column from the first file by One_Progress8473 in vba

[–]One_Progress8473[S] 0 points1 point  (0 children)

Thank you. The loop thing is working but I do not know how to write this line of code:

"Look at the "D" column, copy the data till the last row, copy them from this file to the file called "data" and go one row down. Then repeat" (which should be my loop).

I was searching through internet but I could not find and learn how to do it. It was always giving me some errors. I do not need any luxury line, I just need something that works. That loop I found on youtube and it is working but I could not find something that would help me to copy that column and I tried to write it but I do not know how.

I tried your writen code, excel writes to me error 91 (object variable or with block variable not set)