# The first instance of a number in a string

1. ## The first instance of a number in a string

I have some text, such as this:

PD91-A-1000-1_R1D

How can I find the first instance of a number after the "_"? I want Excel to find the "1" after the "_" and cut it to the end resulting in "1D".

I hope that makes sense.

Thanks!

2. I assume you can't do something as simple as

=RIGHT(A1,2)

To return all the data from the first digit after the underscore try

=REPLACE(A1,1,MIN(FIND({0,1,2,3,4,5,6,7,8,9}, A1&1234567890,FIND("_",A1)))-1,"")

3. Unfortunately life is not as simple as =RIGHT(A1,2). I need to make this formula universal and the text after the "_" will vary in character length etc... The other formula you posted is what I am looking for though.

Thank you very much!

There are currently 1 users browsing this thread. (0 members and 1 guests)

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1