Getting text out of strings

CyberLady

New Member
Joined
Jun 16, 2011
Messages
5
Hi all,

I'm trying to pull out two types of text from following string of data (located within one cell).

The text I want to pull out is not always the same size, and the text I need to pull out is not always in the same spot...

Since the text string will vary, I will here show you only two example;

Example 1
Text string

;#{1}Categories (Sub & Main);#{8}General Corporate Documents;#{29}Shareholder meetings /AGM;#

Text 1 that I want to pull out (red); General Corporate Documents
Text 2 that I want to pull out (blue); Shareholder meetings /AGM
//the pink numbers will also vary

Example 2
Text string

;#{1}Categories (Sub & Main);#{10}ICT;#{40}Frame Agreement;#

Text 1 to pull out (red); ICT
Text 2 to pull out (blue); Frame Agreement
//the pink numbers will also vary

Hope that someone with a brigth head can help me with this:)

Thanks in advance for your help!
 
Hi, and thanks for your fast respond. The code you sent works brilliant:) But, I need a "default code" for B1 and C1 - in other words if I have a text string as A1 or A2 or another - the B1 and C1 code should be able to get the text behind bracket #2 and #3....

Thanks!


Oh, my oh my....think I need some better glasses...seems as the code you have presented in B1/B2 and C1/C2 are the same. In other words what i really wanted....

Your are a fantastic code master!!!!
 
Upvote 0

Excel Facts

Why does 9 mean SUM in SUBTOTAL?
It is because Sum is the 9th alphabetically in Average, Count, CountA, Max, Min, Product, StDev.S, StDev.P, Sum, VAR.S, VAR.P.
Oh, my oh my....think I need some better glasses...seems as the code you have presented in B1/B2 and C1/C2 are the same. In other words what i really wanted....

Your are a fantastic code master!!!!

Apologize for my stupidity with replying. I'm very new in this forum (got my account today):)
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,718
Members
452,939
Latest member
WCrawford

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top