# Extracting last four digits

#### Cossie

##### Active Member
hello

I am looking th be able to extract the numbers at the end of a string of text. I also need to be able to extract the number regardless of the length of the text in front of it. I need it to be extracted to another cell.

Finance & Admin Services 4100 on this example i need to extract the 4100
System Professional Learning 5306 on this example i need to extract the 5360

Any assistance would be appreciated as usual

### Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

#### Michael M

##### Well-known Member
Try

Excel 2003
AB
2System Professional Learning 53065306
Sheet1
Cell Formulas
RangeFormula
B1=RIGHT(A1,4)*1
B2=RIGHT(A2,4)*1

=RIGHT(cell, 4)

Thanks very much

#### Cossie

##### Active Member
can i add this to this formula?

=VLOOKUP(\$A3,Sheet1!\$A\$2:\$BD\$1200,34,0)

#### Robert Mika

##### MrExcel MVP
can i add this to this formula?

=VLOOKUP(\$A3,Sheet1!\$A\$2:\$BD\$1200,34,0)
Like this?
I wour rather used INDEX/MATCH to avoid such a bif table references:
Excel 2010
ABCBD
15306System Professional Learning 5306Finance & Admin Services 4100
2System Professional Learning 5306
3

</tbody>
Sheet1

Array Formulas
CellFormula
B1{=INDEX(\$BD\$1:\$BD\$17,MATCH(A1,--RIGHT(\$BD\$1:\$BD\$17,4),0))}

</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>

or:

Excel 2010
ABCBD
2System Professional LearningSystem Professional Learning 5306
3
Sheet1
Cell Formulas
RangeFormula
B2{=SUBSTITUTE(INDEX(\$BD\$1:\$BD\$17,MATCH(A1,--RIGHT(\$BD\$1:\$BD\$17,4),0)),A1,"")}
Press CTRL+SHIFT+ENTER to enter array formulas.

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

1,164,156
Messages
5,835,707
Members
430,381
Latest member
tntcute

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