Solved

The opposite of concatenate in Excel ?

Posted on 2001-06-26
6
6,147 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
Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
Recently Microsoft released a brand new function called CONCAT. It's supposed to replace its predecessor CONCATENATE. But how does it work? And what's new? In this article, we take a closer look at all of this - we even included an exercise file for…
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now