# How to find the last right hand numbers

#### texasalynn

##### Well-known Member
I am trying to figure on a formula to return the right x digits from a cell. The problem is that sometimes it will be the last 3 and sometimes the last 4. My data looks like this
01002BI732
01002BJ735
01002BK906
01002BP1101
01002BQ1116
01002BR1118
01002BW705
01002BY1325
So what I need is the numbers after the alpha. Does someone know how I can do this?

Thanks . . . texasalynn

### Excel Facts

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

#### Smitty

##### Legend
If your leading characters always number 7 as in your example, you could use Data-->Text to Columns-->Fixed Width & create a break line after the last alpha character.

HTH,

Smitty

#### texasalynn

##### Well-known Member
Just but I need to leave that column as is

texasalynn

##### MrExcel MVP
texasalynn said:
Just but I need to leave that column as is

texasalynn

So, would that not mean...

=--RIGHT(A1,LEN(A1)-7)

#### Cbrine

##### Well-known Member

This will work as well

=IF(ISNUMBER(VALUE(MID(A1,LEN(A1)-3,1))),RIGHT(A1,4),RIGHT(A1,3))

This formula checks to see if the 4 character back is a number and uses that to determine where to do the right string to.

#### texasalynn

##### Well-known Member
Well of course Aladin! I was over thinking it. Yours would be the simple answer and works.

Thanks . . . texasalynn

#### rrdonutz

##### Well-known Member
Also:

=--REPLACE(A1,1,7,"")

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,168,082
Messages
5,857,251
Members
431,866
Latest member
Paula777

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