Extract last 4 of numeric string

stevembe

Well-known Member
Joined
Mar 14, 2011
Messages
501
Grateful as ever for assistance from anyone. A snippet of Column A in my spreadsheet looks like this:

2511</SPAN>
3716</SPAN>
9732</SPAN>
32153</SPAN>
33529</SPAN>
70921</SPAN>
08001174</SPAN>
08002101</SPAN>
08003716</SPAN>
08004693</SPAN>
08004918</SPAN>

<TBODY>
</TBODY><COLGROUP><COL></COLGROUP>

As can be seen there are numeric strings varying in length. Is there a way I can put a formula in Column B that will only pick up the last 4 digits of all the values in Column A?
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
Glad to help, thanks for the feedback.

FYI, Now that I've looked at it, it doesn't actually matter if the numbers are at least 4 digits.
It will still work even if it's only 1 2 or 3 digits.
It will however error on a blank cell, or a cell with text values.
 
Upvote 0

Forum statistics

Threads
1,195,838
Messages
6,011,886
Members
441,651
Latest member
drewe2000

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