How to extract data from the text file

undercrisis01

New Member
Joined
Mar 24, 2011
Messages
24
Hello,

I really find this site informative and helpful to people who had lesser skills with regards to excel such as myself. I am knocking once again to ask for some assistance.

I have a text file that contains a huge amount of data but i only need some parts of it. currently im doing it manually by searching for the keyword, highlight on the needed information, copy-paste to another text file and save in excel as delimited.

The data looks like this:

A 1 1213A45-1 Button part 3 pcs
AB Designer A348
A 2 GH23L-5 Illinois middle 0.5 g
A 2 LP165-3 starters new top 2.0 g
A 3 XB-349 Thread Long 1.6 m
A 1 1213B76-6 Leather part 1.0 pcs
AB Designer B293
A 2 SLK90-9 New wave Bottom 48.5 g
A 2 LDFK-23-1 Feather Accent 0.36 g
A 2 78-83-123L Glitter thread Liner 0.12 g
A 2 LK-PO-143 starters new top 2.0 g
A 3 7893-JK-9 package Outer 1.3 g
A 1 1213C35-1 Covers
AB Designer L276
A 2 AITJ-837 Plastic
A 3 BM-223 Laso Bottom 3 m
A 1 1244B16-6 Leather3 part 4.0 pcs
AB Designer B291
A 2 SL256-3 New wave BottomCover 48.5 g
A 2 LDHT-22-1 Feather Blower 0.36 g
A 2 78-83-123L Glitter thread Liner 0.12 g
A 2 LK-PO-143 starters new top 2.0 g
A 3 7893-JK-9 package Inner 1.3 g

In this case, i will search for 1213C35-1 & 1213A45-1, this will then be the extract pasted in a new text file then saved in excel as tab delimited:

A 1 1213C35-1 Covers
AB Designer L276
A 2 AITJ-837 Plastic
A 3 BM-223 Laso Bottom 3 m
A 1 1213A45-1 Button part 3 pcs
AB Designer A348
A 2 GH23L-5 Illinois middle 0.5 g
A 2 LP165-3 starters new top 2.0 g
A 3 XB-349 Thread Long 1.6 m

Details that must contain each item is from A 1 to A 3.
Is this possible to code in VB excel?
This task is really tedious not to mention that there are lots of data to extract from a single file
 
I have read somewhere in the forums about using .bat to execute the operation then terminates it once the loop is done.

How exactly is this coded when looking up for the certain part number and copy its details to another sheet?
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.

Forum statistics

Threads
1,224,590
Messages
6,179,749
Members
452,940
Latest member
rootytrip

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