Search for, then extract specific text from a string and separate into columns.

jayhouse

New Member
Joined
Jan 2, 2017
Messages
13
Hello, I am trying to figure out a method to extract upto 10 numbers from within a varied string length and print them out to the proceeding columns.
There will always be atleast one "Fail" in the line and i need the policy id Preceding. Then search for the next fail and print it out in the next column until there are no more.

The Policy number length can range between 6 and 11 characters, but will always be between quotations.

Here is an example of what i am working with.

InputFail 1Fail 2Fail 3Fail 4Fail 5Fail 6Fail 7Fail 8Fail 9Fail 10
[{"PolicyId":"31.13.1","Result":"Skip"}],[{"PolicyId":"21.2.1","Result":"Fail","Notes":"blah blah blah blah.
","AdditionalItems":[]}]
[{"PolicyId":"31.32.11","Result":"Fail","Notes":"blah blah blah blah blah blah blah.
","AdditionalItems":[]}],[{"PolicyId":"6000.12.13","Result":"Fail","Notes":"blah blah blah blah.
","AdditionalItems":[]}]

<tbody>
</tbody>
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Give this a try, the formula in cell B2 should be copied across and down as needed:
Excel Workbook
ABC
1InputFail 1Fail 2
2[{"PolicyId":"31.13.1","Result":"Skip"}],[{"PolicyId":"21.2.1","Result":"Fail","Notes":"blah blah blah blah.","AdditionalItems":[]}]21.2.1*
3[{"PolicyId":"31.32.11","Result":"Fail","Notes":"blah blah blah blah blah blah blah. ","AdditionalItems":[]}],[{"PolicyId":"6000.12.13","Result":"Fail","Notes":"blah blah blah blah.","AdditionalItems31.32.116000.12.13
Sheet
 
Upvote 0
:eek: How the.. Yeah this works!
I am a little confused how its working, but i guess i will need to watch the formula work and study up! Thank you for the hel
 
Upvote 0

Forum statistics

Threads
1,214,384
Messages
6,119,201
Members
448,874
Latest member
Lancelots

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