ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Extract Last 4 Strings from text (https://www.excelbanter.com/excel-programming/427402-re-extract-last-4-strings-text.html)

Jacob Skaria

Extract Last 4 Strings from text
 
Both in Excel and VBScript RIGHT() will work..

Msgbox Right("123456",4)

If this post helps click Yes
---------------
Jacob Skaria


"PumaMan" wrote:

I need to extra the last 4 strings from a text that may range in length.

Example:
"123456789101" I need to extract only "9101"
"abc1 4321" I need to extract only "4321"

It will always be the last 4 of the text if that helps. I'd like to know
how to do it in Excel primarily, but VBA is fine too.



All times are GMT +1. The time now is 02:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com