ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   data from multiple files (https://www.excelbanter.com/excel-programming/423458-data-multiple-files.html)

Paul Wilson[_2_]

data from multiple files
 
Hi,

I wish to run a macro that will use the FileName and SEQNO from an new
workbook to open a FileName and copy a row of data based on the SEQNO, and
paste back in the original workbook on the second worksheet.

I have set the macro already to create the filename and sort based on the
filename from original data so that all the same filename records that need
to be extracted are together.

I'm a novice and I'm not sure where to go from here.

Cheers
Paul Wilson

Jim Cone[_2_]

data from multiple files
 
Just guessing...
'--
Dim SequenceNum As Double
SequenceNum = Val(ThisWorkbook.Sheets(1).Range("A1").Value)
Workbooks.Open "Sludge" & SequenceNum & ".xls"
ActiveWorkbook.Sheets(1).Rows(SequenceNum).Copy _
Destination:=ThisWorkbook.Sheets(2).Rows(SequenceN um)

Also, since you are a novice, this may be of some help...
http://support.microsoft.com/KB/555375
"How to Ask a Question"
--
Jim Cone


Portland, Oregon USA

"Paul Wilson"

wrote in message
Hi,
I wish to run a macro that will use the FileName and SEQNO from an new
workbook to open a FileName and copy a row of data based on the SEQNO, and
paste back in the original workbook on the second worksheet.

I have set the macro already to create the filename and sort based on the
filename from original data so that all the same filename records that need
to be extracted are together.

I'm a novice and I'm not sure where to go from here.
Cheers
Paul Wilson


All times are GMT +1. The time now is 05:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com