Solved

The opposite of concatenate in Excel ?

Posted on 2001-06-26
6
6,177 Views
Last Modified: 2008-02-26
Hi,

I'm trying to separate a string of text such as: UKFRABC012345-123Z 456000 Left

Which is unfortunately in one cell only, to the following (column separator is ^): UKFR ^ ABC012345 ^ 123Z ^ 456000 ^ left.

Quite straightforward, I need the opposite of concatenate - maybe a nested IF will work, I'm not sure.

Any ideas welcome, 200 up for grabs :)

Thank you,

Tricky
0
Comment
Question by:Tricky
  • 4
  • 2
6 Comments
 
LVL 13

Accepted Solution

by:
cri earned 200 total points
ID: 6227135
Are the positions fixed ? And is using auxiliary cells an option ? If yes to both, use the MID function:
=MID(A1,1,5)=UKFR
=MID(A1,5,9)=ABC012345
etc.

 
0
 
LVL 13

Expert Comment

by:cri
ID: 6227138
Of course you can also make a VBA function which uses the MID function.

If the position is not given, do the separation follow some rules / markers ?
0
 

Author Comment

by:Tricky
ID: 6227160
Perfect, nice job :)

Thanks...
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 13

Expert Comment

by:cri
ID: 6229000
ThAnk you. If you need further info regarding string handling in VBA, please ask, this was a lot of points for this kind of question.
0
 

Author Comment

by:Tricky
ID: 6229478
I needed an accurate answer quickly, so the points were worth it...

I'll be sure to look out for you in the future ;p

0
 
LVL 13

Expert Comment

by:cri
ID: 6230278
Ok.

For the KPro users and PAQ 'buyers':

Lots of usefull tips, including string handling
http://www.cpearson.com/excel/topic.htm

Extracting the n-th Element From a String
http://www.j-walk.com/ss/excel/tips/tip32.htm

Hints/Caveats:

a) Whereas text comparision in worksheets are case insensitive, the default in VBA is case sensitive, unless you start a module with
'Option Compare Text'

b) Excel|Help|Find 'About text functions' will give you a good overview of all regular Excel text functions
 
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

713 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question