adding a space to a text string

B

Brian.anderson

I am attempting to add a space to a text string in
multiple cells. Please see example below:

The text string I have is:
ROJ123456/1R1A

The result I want is:
ROJ123456/1 R1A

My question is how do I get the function to ignore the
first "R", search for the Second "R" and insert a space
before the second "R"

I also have the scenario where the leading alpha character
is not an "R". See example below:

The Text String I have is:
BFB101001/1R1A

The result I want is:
BFB101001/1 R1A

How do I get the function to put a space before the "R".

Any help would be most appreciated.

Thanks.
 
K

Kent

Most effective way depends on all of the data you're
trying to do this too. Is it always a space before the
last three characters? Is it always a single digit after
the "/"? See, it can depend on how complex the pattern is.

To fix the given example, I'd be tempted to do something
like =MID(A1,1,LEN(A1)-3)&" "&RIGHT(A1,3)

Excel Support Technician
www.canhelpyou.com
-----------------------------------------------------------
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top