text mining particular values in a cell using excel VBA

kumarcoolz

New Member
Joined
Mar 24, 2013
Messages
7
I have a excel file with about 1000 Rows and a single column,
each cell contains a similar example:
Cell A1
(INSPECTION RESULT: /(1)FACE "AA" GALLED, EXCEED EM LIMIT (0.010" MAX.). /( EXISTING: UP TO 0.037" APPROX. /(2)FACE "AD" GALLED, EXCEED EM LIMIT (0.010" MAX.). /( EXISTING: UP TO 0.030" APPROX. /(3)CORROSION PITTED MORE THAN EM LIMIT(0.001" MAX. IN DEPTH) AT AIRFOIL SURFACE, REJECT.
Cell A2
(INSPECTION RESULT: /(1)FACE "AA" ERODED, EXCEED EM LIMIT (0.010" MAX.). /( EXISTING: UP TO 0.050" APPROX. /(2)FACE "AD" SCORED, EXCEED EM LIMIT (0.010" MAX.). /( EXISTING: UP TO 0.048" APPROX.
I want to "mine" these cells in such a way that every time the program "sees" these text, a new line is to be created in excel in the following format as below,


Code:
[COLOR=#303336][FONT=inherit]   A               B [/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#303336][FONT=inherit]DAMAGE TYPE[/FONT][/COLOR][COLOR=#303336][FONT=inherit])[/FONT][/COLOR][COLOR=#303336][FONT=inherit]          C [/FONT][/COLOR][COLOR=#303336][FONT=inherit]([/FONT][/COLOR][COLOR=#303336][FONT=inherit]EXISTING LIMIT[/FONT][/COLOR][COLOR=#303336][FONT=inherit])[/FONT][/COLOR]
<code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit; font-stretch: inherit; line-height: inherit; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; vertical-align: baseline; box-sizing: inherit; white-space: inherit;">[COLOR=#303336][FONT=inherit]FACE [/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]"AA"[/FONT][/COLOR][COLOR=#303336][FONT=inherit]             GALLED                  [/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]0.037[/FONT][/COLOR][COLOR=#303336][FONT=inherit]
FACE [/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]"AD"[/FONT][/COLOR][COLOR=#303336][FONT=inherit]             GALLED                  [/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]0.030[/FONT][/COLOR][COLOR=#303336][FONT=inherit]
                   CORROSION PITTED             [/FONT][/COLOR][COLOR=#303336][FONT=inherit]-[/FONT][/COLOR][COLOR=#303336][FONT=inherit] 
FACE [/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]"AA"[/FONT][/COLOR][COLOR=#303336][FONT=inherit]             ERODED                  [/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]0.050
[/FONT][/COLOR]</code>[COLOR=#303336][FONT=inherit]FACE [/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]"AD"[/FONT][/COLOR][COLOR=#303336][FONT=inherit]             SCORECD                 [/FONT][/COLOR][COLOR=#7D2727][FONT=inherit]0.048[/FONT][/COLOR]



Data is not the same structure, so I'm afraid that there is no way to absolutely do 100% of process auto. Big problem is lines like CORROSION PITTED. but something is better than nothing.
I did not try out any codes (vba- excel), I am not sure if this is possible in the first places. Any ideas or suggestion on this would be greatly welcome :-).

I cross posted this query in Stackoverflow... as there is no response , i reposted it here


 

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
I cross posted this query in Stackoverflow... as there is no response , i reposted it here
Could you please supply a link to this post
Cheers
 
Last edited:
Upvote 0
I'll bite, but I need the following questions answered.

  1. Will it only every be FACE "AA" and FACE "BB"
  2. How many 'lines' will there be? There are three in the first section, and two in the second. Will the lines always be identified by "(x)", "(y") etc?
  3. Are there any other phrases than "GALLED", "CORROSION PITTED", "ERODED" and "SCORED"?

Likely have to be a VBA solution if you want there to be no blank rows between 'sections'. There may be more questions.

Cheers

pvr928
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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