Import Multiple Text Files Into One Sheet

Kindlysinful

New Member
Joined
Feb 17, 2007
Messages
29
Here is what I would like to be able to do;
Using excel I want to be able to import certain data fields, from certain text files, inside a certain folder, into certain cells on an ongoing updated spreadsheet, adding rows as I go. There maybe anywhere from two to 100 text files in the folder at any time. Let’s say my folder is on the desktop of “C” drive and named, “Import This Data”. My excel spreadsheet is titled “Imported Data”.
Example of my spreadsheet;
[TABLE="width: 654"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[TD]I[/TD]
[TD]J[/TD]
[TD]K[/TD]
[TD]L[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]Part#[/TD]
[TD]LOT#[/TD]
[TD]Lat#[/TD]
[TD]Status[/TD]
[TD]Date Tested[/TD]
[TD]Another Date[/TD]
[TD]PR1-
SAM#1[/TD]
[TD]PR1-SAM#2[/TD]
[TD]PR1- SAM#3[/TD]
[TD]PR2-SAM#1[/TD]
[TD]PR2-SAM#2[/TD]
[TD]PR2-SAM#3[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]999999X[/TD]
[TD]88888888[/TD]
[TD] L999999[/TD]
[TD][/TD]
[TD]04/12/2018[/TD]
[TD][/TD]
[TD]13724.365[/TD]
[TD]14577.026[/TD]
[TD]13405.151
[/TD]
[TD]6168.254[/TD]
[TD]8098.348[/TD]
[TD]6358.175[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

The text file name would be changing but have this in common at the end of the name, “_Summ”.
Here is an example of what the text file looks like;
Identity Line 1 XXXXXXXXXXXXXXX
Identity Line 2 XXXXXXXXXXXXXXXXX
Lot #: 88888888
LAT #: L9999999
Part #: 999999X XXXXXXXXXXXXXXXX
Date Tested : Thu, Apr 12, 2018 09:54 AM
Operator ID# 9999
# Samples: 3

Sample# Pressure 1 Pressure 2
1 xxxxxxx xxxxx xxxx xxxxx xxxx xxxx 13724.365 6168.254
2 xxxxxxx xxxxx xxxx xxxx xxxx xxxx 14577.026 8098.348
3 xxxxxxx xxxxx xxxx xxxx xxxx xxxx 13405.151 6358.175
 
Last edited:

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,223,896
Messages
6,175,264
Members
452,627
Latest member
KitkatToby

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