VBA to extract values from multiple spreadsheets into one

Sohail01

New Member
Joined
Jan 16, 2008
Messages
6
Hi, I have 30 files in the same folder (P3/2014/PPD Data) one for each month (last 30 months). Each file has approx 6000 rows of data with prices for the drugs for that month.

I need to extract the data relating to only 5 of these drugs over the 30 months (call them drug 1, drug 2, etc). The file I will pull the data into is in the same file path and folder and is called 'FOI July18'.

rather than cut and paste all the data into a single file from all these 30 files is there a VBA that will do this and only pull out the data for the 5 drugs?

thanks,
 

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Hi Any help with this please would be much appreciated. thanks,

Hi, I have 30 files in the same folder (P3/2014/PPD Data) one for each month (last 30 months). Each file has approx 6000 rows of data with prices for the drugs for that month.

I need to extract the data relating to only 5 of these drugs over the 30 months (call them drug 1, drug 2, etc). The file I will pull the data into is in the same file path and folder and is called 'FOI July18'.

rather than cut and paste all the data into a single file from all these 30 files is there a VBA that will do this and only pull out the data for the 5 drugs?

thanks,
 
Upvote 0
Hi Sorry not sure if this is the way 'bump up' but just trying to bring this to the fore again. thanks,
 
Upvote 0

Forum statistics

Threads
1,224,919
Messages
6,181,747
Members
453,064
Latest member
robatthe2A

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
Back
Top