How to Find / Separate a Number from Message Text

Paul.DeVito

New Member
Joined
Aug 20, 2012
Messages
2
Is there a way to find and seperate a number from message text? These are all errors within the system. Ultimately I would like to identify material numbers that are generating multiple errors.

Below are several examples. In some cases, the number is not completely seperated (adjoined to /, :, alpha-numeric).


Message Text: Material 5-1617353-7 in plant 0920 has no BOM
Number: 5-1617353-7

Message Text: Cost estimate for material 3-1616980-4/ plant 0919 is incorrect
Number: 3-1616980-4

Message Text: Material CA7934-000 in plant 4110 has material status B5
Number: CA7934-000
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Hi,

Auuming that the material number is 10 or 11 digits long and always appears at the end as shown in the example,
Message Text : Material 5-1617353-7 in plant 0920 has no BOM number: 5-1617353-7</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>

=TRIM(RIGHT(A32,11))

Jai
 
Upvote 0
Hello Jai - Thank you for your response. Your formula may be useful for a couple of the fields, unfortunately the majority contain the part number somewhere within the text. In all examples, the Message Text is what I currently have and the Number is what is the piece of information I would like to end with.

The part number will always be between 8 and 11 characters and will always end in a number (never a letter or symbol).
 
Upvote 0
Hi,

I tried to work on this and came up with this.

=TRIM(MID(A32,FIND("Material",A32)+LEN("Material"),12))

The function assumes that part no comes after the word Material in the text. I have taken length of the part as 12 as I was not able to write a code for it. So this may not work for parts whose length is 8,9.

Jai
 
Upvote 0

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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