Date from Text file to Excel spreadsheet

chiswickbridge

Board Regular
Joined
Feb 2, 2013
Messages
130
Hi All,

I have a text file called NAV0.txt in D:\CHBG\Investments. This text file has about 12,000 rows and keeps increasing by 5 / 10 rows every week.

The source file is has header and data as follows :

Scheme Code;ISIN Div Payout/ ISIN Growth;ISIN Div Reinvestment;Scheme Name;Net Asset Value;Repurchase Price;Sale Price;Date

120523;INF846K01ET8;INF846K01EU6;Axis Triple Advantage Fund - Direct Plan - Dividend Option;10.6734;10.5667;10.6734;19-Jun-2013
120524;INF846K01EV4;-;Axis Triple Advantage Fund - Direct Plan - Growth Option;12.3949;12.2710;12.3949;19-Jun-2013
113065;INF846K01776;INF846K01784;Axis Triple Advantage Fund - Dividend Option;10.6371;10.5307;10.6371;19-Jun-2013
113064;INF846K01768;-;Axis Triple Advantage Fund - Growth Option;12.3510;12.2275;12.3510;19-Jun-2013

As you can see the data is separated by a semicolon and the rows are separated by carriage return

I need a macro to read this data from the file and insert it in a Excel sheet

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]Numeral[/TD]
[TD]String[/TD]
[TD]Numeral with 4 decimals[/TD]
[TD]Date in dd-mmm-yyy[/TD]
[/TR]
[TR]
[TD]Scheme Code[/TD]
[TD]Scheme Name[/TD]
[TD]Net Asset Value[/TD]
[TD]Date[/TD]
[/TR]
[TR]
[TD]120523[/TD]
[TD]Axis Triple Advantage Fund - Direct Plan - Dividend Option[/TD]
[TD]10.6734[/TD]
[TD]19-Jun-2013[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]













Please help with a macro to import the data.

Awaiting your Help:confused:
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes

Forum statistics

Threads
1,223,911
Messages
6,175,337
Members
452,637
Latest member
Ezio2866

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