Excell Macro

djeerd

Board Regular
Joined
May 4, 2006
Messages
94
I have a folder named "FAB" on my desktop. Inside the folder "FAB" I have 850 Excell spreadsheet files. I need to get some data off each file and have it put it on a new spreadsheet. The data is in cell A2, B2, D5 and E10 for each of the 850 files. I am running Windows 7
 
The Macro works. Thank you so much.

There is one issue I hope you can also solve. Data in cell n39 is actually a formula (j10+j23+K13) so the macro returns "#REF" for cell N39. I could have the macro list cells J10, J23 and K13 then I could add them together but I was hoping to be able to just have the macro list out the value from the formual for N39.
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Instead of:-
Code:
.Range("N39").Copy Destination:=ws.Cells(iRow, "D")
do this:-
Code:
.Range("N39").Copy
ws.Cells(iRow, "D").PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks:=False, Transpose:=False
 
Upvote 0
Thank you for your patience.

When I add the correct line i get the following message "Complie Error" "expected: end of statement".
 
Upvote 0
"Line"? You mean "lines", yes? The copy and the paste are two separate statements.
 
Upvote 0

Forum statistics

Threads
1,225,149
Messages
6,183,194
Members
453,151
Latest member
Lizamaison

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