ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Open two text file in Excel (https://www.excelbanter.com/excel-programming/290439-open-two-text-file-excel.html)

Eric[_6_]

Open two text file in Excel
 
Hi,

How could I open or merge two text file in excel, I am
trying to create a macro that would join my two text in
excel. Something like this:

File1 Contains my header:
Name
Company Name
Address
City

File2 Contains my data:
Joe Peter,ABC Company, 123 1st Street, Unicity
John Does, MyCompany, 345 22nd Street, City
..
..
.. and soon.

I want to put Name on top of Joe Peter, Company Name on
top of ABC Company, and soos

How could I do this?

Thanks for your help.
Eric




Tom Ogilvy

Open two text file in Excel
 
Open the first, select the header data, do copy, then do paste special
transpose onto a master sheet.

opne the second file, copy the data and paste below the transposed header on
the master sheet.

Turn on the macro recorder, then do it manually. This will give you the
basic code you need - you can then generalize it.

--

Regards,
Tom Ogilvy

"Eric" wrote in message
...
Hi,

How could I open or merge two text file in excel, I am
trying to create a macro that would join my two text in
excel. Something like this:

File1 Contains my header:
Name
Company Name
Address
City

File2 Contains my data:
Joe Peter,ABC Company, 123 1st Street, Unicity
John Does, MyCompany, 345 22nd Street, City
.
.
. and soon.

I want to put Name on top of Joe Peter, Company Name on
top of ABC Company, and soos

How could I do this?

Thanks for your help.
Eric







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

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