# How to extract last set of digit from text string?

#### xlmaniac

##### Well-known Member
Dear All,
I do have a following sample set as follows.
I would ike to extract the last set from the string as mentioned below.
Could somebody help me with the formula which can perfom the task as desired?
Sheet1

 * A B 1 Sample Data Desired Result 2 AA BB CCC DDD DDD 3 AAA B CC DDD EE EE 4 AA BBB C DDDD E FFF GG GG 5 AAAA BB CCC DDDD EE FFFF FFFF

<colgroup><col style="width: 30px; font-weight: bold;"><col style="width: 198px;"><col style="width: 93px;"></colgroup><tbody>
</tbody>

Excel tables to the web >> Excel Jeanie Html" target="_blank"> Excel Jeanie HTML 4

### Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.

#### Paella1

##### Active Member
In B2:
=RIGHT(A2,LEN(A2)-SEARCH("^^",SUBSTITUTE(A2," ","^^",LEN(A2)-LEN(SUBSTITUTE(A2," ","")))))

#### xlmaniac

##### Well-known Member
Dear Paol,
Thank you so much for the mesmerising solution.
Really appreciate your support & help

#### Rick Rothstein

##### MrExcel MVP
Another way...

=TRIM(RIGHT(SUBSTITUTE(A1," ",REPT(" ",300)),300))

Very nice Rick.

Replies
3
Views
93
Replies
0
Views
156
Replies
0
Views
160
Replies
15
Views
712
Replies
15
Views
889

### Forum statistics

1,129,685
Messages
5,637,809
Members
416,983
Latest member
LessThanAverageUser

### 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.

### Which adblocker are you using?

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

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