HELP! Macro/VBA needed for opening excel file

tcw1986

New Member
Joined
Nov 3, 2011
Messages
1
Hi,

I need to create a macro and I have no idea what I'm doing using VBA and recording doesn't really work. Can anyone help??

I think I will need several macros but I want to be able to look at a cell in the macro template file (eg cells B8, B47 and B87) which has my "File ID" and then open the second file (with that File ID within a specific folder) which has the data I need. The data needs to be sorted in alphabetical order (currently A01, C01, E01 etc etc, needs to be A01, A02, A03 etc). and then paste column B into the D column of the original document. It then does the same for a second data file with the same name but found in a different folder and pastes into the column E.

I have no experience of VBA, so I really don't know how to open the area I need to edit the VBA or enter any VBA or anything. Recording a macro at the moment does everything I want but is limited to only opening the file I use while recording the macro, where I want it to open the file specific to B8, B47, B87 etc.

cheers
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,224,427
Messages
6,178,586
Members
452,860
Latest member
jroberts02

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