Solved

Excel Formula to Pull Data from Text String

Posted on 2016-08-03
7
74 Views
Last Modified: 2016-08-03
Hello -

Based on the attached example I am looking for a formula that will pull the text between the 3rd and 4th "~" in the string.  So the result from cell A1 would be alpha,  Result from cell A4 would be ZT, etc.  All results can be placed in column B.

Thanks!
0
Comment
Question by:Escanaba
7 Comments
 
LVL 1

Author Comment

by:Escanaba
ID: 41740865
0
 
LVL 43

Accepted Solution

by:
Saqib Husain, Syed earned 500 total points
ID: 41740889
=TRIM(LEFT(SUBSTITUTE(REPLACE(A1,1,FIND("<",SUBSTITUTE(A1,"~","<",3)),""),"~",REPT(" ",9999)),100))
0
 
LVL 29

Expert Comment

by:Subodh Tiwari (Neeraj)
ID: 41740948
Please try this......

In B1
=TRIM(MID(SUBSTITUTE(A1,"~",REPT(" ",LEN(A1))),LEN(A1)*3,LEN(A1)))

Open in new window

and then copy it down.
0
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
LVL 49

Expert Comment

by:Rgonzo1971
ID: 41740964
Hi,

pls try

=TRIM(MID(SUBSTITUTE(A1,"~",REPT(" ",999)),3*999,999))

Open in new window

Regards
0
 
LVL 7

Expert Comment

by:tomfarrar
ID: 41740971
See attached.  Use the Text To Column function.  Instructions in the spreadsheet attached.
EE-Example--1-.xlsx
0
 
LVL 1

Author Closing Comment

by:Escanaba
ID: 41741271
Thanks!
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 41741572
Thanks for the points but I do wonder why you did not consider the shorter formulas.
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
Phishing attempts can come in all forms, shapes and sizes. No matter how familiar you think you are with them, always remember to take extra precaution when opening an email with attachments or links.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa‚Ķ

821 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