PDA

View Full Version : Macro to Copy Paste Data in a Worksheet



Weezer
09-30-2010, 08:38 AM
Hello everybody hope somebody here can help me with my macro problem.

I'm trying to build a macro that looks into a specific folder (example C:\Files)
and looks into every excel file that is in there & copy pastes data from specific worksheets in each workbook. The worksheets all have the same sheet names & I only need 14 sheets from a 20 sheet workbook.

Since the Worksheets have uniform names across all files. I can specify all the worksheets that I need the files from or put a range from "the specific worksheet name" to "a specific worksheet name". In these worksheets that I am copy pasting data into a fresh workbook I want only a Range of data from each worksheet. This is from Column A - Column K until Rows 474. So this is Row A6 to Row K6 (horizontal Range) all the way down to Row 474.

I need some serious help on this, I hope you guys can work your magic

Thanks!

stanleydgrom
09-30-2010, 07:38 PM
Weezer,

1. What version of Excel are you using?

2. The files to copy from are in folder/directory C:\Files

3. What are the file extensions of the files to copy from?

4. What are the 14 sheetnames to copy range A6:K474 from?

5. What is the sheetname to copy to?

6. What is the first cell to be populated in the sheetname to copy to?


Please post a sample workbook to copy from with sensative information changed:
Click on the Post Reply button, then scroll down and click on the Manage Attachments button.

In the attached workbook also have a worksheet Summary where you manually copy data from one of the other 14 or so worksheets.

Weezer
10-01-2010, 01:47 PM
Hey,

I'm on Excel 2007

The extension of the files are .xls

The sheet names are Local 1, Local 2, National 1, National 2, etc. If you give me the code for 2 or 3 of them I can figure out the rest.

It would be copied to an entirely new Workbook called DataCopyLocalSheet.xlsx or xls, whichever extension would be applicable in this case.

The first cell to be populated would be A1.

I can't upload the file at this time, since I don't have it on me right now but is it possible to work with the info that I gave you so far?

look forward to your reply.

davmec93
10-05-2010, 02:01 PM
Were you ever able to get the file to upload? I'm interested in trying to help.

Aussiebear
10-05-2010, 03:08 PM
In almost all cases, a sample workbook provided will enable an issue to be easily sorted. Please upload a workbook by clicking on Go Advanced scroll down to Manage Attachments, and go from there.