VBA Code to copy specific contents from 2 text files to separate excel columns

Miteshkg

New Member
Joined
Jan 7, 2016
Messages
11
HI all,

I've a specific requirement where in there will be 2 text files which will have information like normal text plus date and time stamp of communication. Basically, the VB code should read each line of text file and copy date and time to one column in excel and other text contents to second column. all text contents are available only after date and time format like [‎12/‎30/‎2015 10:01 PM] Srinivasan Varadaraj: Dear All, We have .....................blablabla....
So what I want is copy ‎12/‎30/‎2015 10:01 PM in Column A and everything after ":" should be in Column B..

Like this, Code should read through end of text file and where ever the time stamp is written, copy to Excel Column A and remaining text after ":" to Column B.

Let me know if I've made my self clear to explain my requirement. I need to submit a project by EOD tomorrow. Any quick help is highly appreciated.

Please :confused::confused::confused::confused:
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number

Forum statistics

Threads
1,215,514
Messages
6,125,263
Members
449,219
Latest member
daynle

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