Extracting Number String from Long Text/Number String

Garmerr

New Member
Joined
Sep 13, 2017
Messages
10
Office Version
  1. 365
Platform
  1. Windows
Hello Everyone,
Long time lurker, first time poster.

I am interested in pulling an 8 to 10 digit number string from a cell populated with text and numbers. The number string will change in content and location. The preceding characters will also change between numbers and letters.

Examples:
1) Austria - Wien - Kirchengasse -08202-820263712-LABOR VERBRAUCHSSTOFFE UND AUSRÜSTUNG (590, 610)-82925-001
In example (1) I want to pull out the string "820263712"

2) Austria - Wien - Lange Allee 24 -08202-820262511-LABOR CHEMIKALIEN UND BIOLOGISCHE WIRKSTOFFE (600)-82921-001
In example (2), I want to pull out the string "820262511".

3) 07390-07390-Non-Capital-739070611-POL-?WIADCZENIA – OGÓLNE-82180-ALL
In example (3), I want pull out the string "739070611"

4) United States - Los Angeles CA (BAX)-07001-7001200168-AIDLAPPP-COGS240-MAINTENANCE AND REPAIR SERVICES: OTHER-84789
in example (4), I want to pull out the string "7001200168"

5) 07140-71400637-TRANSPORTE / ENVÍO (339, 947)-83148
in example (5), I want to pull the string "71400637"

Any ideas? Thanks for your time.
 

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.
because the string can vary both in length and location, and there are other numerical strings surrounded by dashes eg -08202- you cannot do this without supplying some intelligence, probably in the form of extracting all numerical strings then manually choosing one of them
 
Upvote 0
Solution

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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