Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Amy Amy is offline
external usenet poster
 
Posts: 165
Default Taking lines from multiple files into one sheet

I have about 20 CSV/Excel files that each have one sheet with two lines: a
header row and one row of data. I need programming that will take row 2 of
every file and compile them into one spreadsheet.

i.e. I currently have a bunch of .csv files that look like this:

File 1:
Site_Id Longitude Latitude Contour_Area VehicleTraffic
Allen Grove -83.2144 35.842 5.79787 39731.36

File 2:
Site_Id Longitude Latitude Contour_Area VehicleTraffic
Ballplay Rd -84.307 35.4895 23.5851 470.651

File 3:
Site_Id Longitude Latitude Contour_Area VehicleTraffic
Battles -83.4404 35.7365 10.2165 17917.16

I need something that will programmatically give me:

Site_Id Longitude Latitude Contour_Area VehicleTraffic
Allen Grove -83.2144 35.842 5.79787 39731.36
Ballplay Rd -84.307 35.4895 23.5851 470.651
Battles -83.4404 35.7365 10.2165 17917.16

Thanks in advance!

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Taking lines from multiple files into one sheet

Try
http://www.rondebruin.nl/copy3.htm

Change
FilesInPath = Dir(MyPath & "*.xl*")

to
FilesInPath = Dir(MyPath & "*.csv")

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Amy" wrote in message ...
I have about 20 CSV/Excel files that each have one sheet with two lines: a
header row and one row of data. I need programming that will take row 2 of
every file and compile them into one spreadsheet.

i.e. I currently have a bunch of .csv files that look like this:

File 1:
Site_Id Longitude Latitude Contour_Area VehicleTraffic
Allen Grove -83.2144 35.842 5.79787 39731.36

File 2:
Site_Id Longitude Latitude Contour_Area VehicleTraffic
Ballplay Rd -84.307 35.4895 23.5851 470.651

File 3:
Site_Id Longitude Latitude Contour_Area VehicleTraffic
Battles -83.4404 35.7365 10.2165 17917.16

I need something that will programmatically give me:

Site_Id Longitude Latitude Contour_Area VehicleTraffic
Allen Grove -83.2144 35.842 5.79787 39731.36
Ballplay Rd -84.307 35.4895 23.5851 470.651
Battles -83.4404 35.7365 10.2165 17917.16

Thanks in advance!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help Taking alot data from one sheet (if not blank) and copying toa list on another sheet. Alex Zuniga Excel Worksheet Functions 1 November 25th 09 11:54 PM
All excel files taking time to open prady Excel Discussion (Misc queries) 0 April 8th 08 09:48 PM
TAKING INFO FROM ONE SHEET AND PRODUCING A LIST IN ANOTHER SHEET Bob Excel Discussion (Misc queries) 0 December 20th 06 07:45 PM
Taking infomation in one sheet and adding it to another sheet BigBadBess24 Excel Discussion (Misc queries) 1 September 19th 06 08:37 PM
Copy sheet from multiple files Steph[_7_] Excel Programming 5 October 31st 05 12:17 AM


All times are GMT +1. The time now is 03:22 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"