VBA copy cells from csv file to next empty row on another workbook, no duplicates

stoneham96

New Member
Joined
Apr 28, 2021
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi all,

I'm brand new to writing VBA code so need all the help I can get.

I have got 'N' number of files located within a folder (for sake of argument use C:\Users\wthomas\Desktop\Data), with the files I need all following the same naming convention "MAL1234567 Data.csv". This folder will continuously be being refreshed with more data (so MAL1234568, MAL1234569 etc.).

I need to copy the data from cells H2:N2 within each of these files and paste it into another workbook. When I paste it, I need it to populate the next free line available within columns B:H, and for it to not paste the data if a duplicate value is seen in column B.

Please let me know if you need any more information.

Thank you in advance for any help you can give me , I really appreciate it :)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Forum statistics

Threads
1,136,864
Messages
5,678,210
Members
419,751
Latest member
richkings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top