Extracting last four digits

Cossie

Active Member
Joined
May 6, 2002
Messages
327
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
Joined
Oct 27, 2005
Messages
21,282
Office Version
  1. 365
  2. 2007
Platform
  1. Windows
Try


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

Cossie

Active Member
Joined
May 6, 2002
Messages
327
can i add this to this formula?

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

Robert Mika

MrExcel MVP
Joined
Jun 29, 2009
Messages
7,256
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

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1

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

<thead>
</thead><tbody>
</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
15306Finance & Admin Services 4100
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.
 
Master Excel Bundle

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.

Forum statistics

Threads
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.
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
Top