ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   spliting text (https://www.excelbanter.com/excel-programming/360318-spliting-text.html)

sungen99[_86_]

spliting text
 

I have in A1 "CNAN6"

I want to strip it into 2 parts.

CNA

and

N6

The N6 is found using =RIGHT(A1,2) so thats easy. But how do I get the
CNA part. Also note that this is not always going to be only 5
characters long. It could be 10. BUT the last two characters will
always be split away from the rest of the string.

Thanks for the help.


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=538024


sungen99[_87_]

spliting text
 

got it... thanks

--
sungen9
-----------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...nfo&userid=914
View this thread: http://www.excelforum.com/showthread.php?threadid=53802


Tom Ogilvy

spliting text
 
=right(a1,2)
=left(a1,len(a1)-2)

--
Regards,
Tom Ogilvy


"sungen99" wrote:


I have in A1 "CNAN6"

I want to strip it into 2 parts.

CNA

and

N6

The N6 is found using =RIGHT(A1,2) so thats easy. But how do I get the
CNA part. Also note that this is not always going to be only 5
characters long. It could be 10. BUT the last two characters will
always be split away from the rest of the string.

Thanks for the help.


--
sungen99
------------------------------------------------------------------------
sungen99's Profile: http://www.excelforum.com/member.php...fo&userid=9144
View this thread: http://www.excelforum.com/showthread...hreadid=538024




All times are GMT +1. The time now is 11:59 AM.

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