Solved

Excel 2007 Formula to Pull Text Before A Certain Character

Posted on 2016-11-02
2
26 Views
Last Modified: 2016-11-02
Hello,

Can someone provide a formula that will pull all the text in a cell that appears before the first appearance of {?  For example, if the cell contains the following: Hello World {123} the formula would return:  Hello World.  If there is no { in the text string then it would just return the full text in the cell.

Thanks
0
Comment
Question by:Escanaba
2 Comments
 
LVL 23

Accepted Solution

by:
Brian B earned 500 total points
ID: 41870332
It can be done with a FIND() and LEFT(). The trick is just to catch the error and return the whole text as you described if the cell doesn't have a { in it.

Try this:
=IF(ISERROR(FIND("{",A1)),A1,LEFT(A1,FIND("{",A1)-2))

Note: The -2 at the end moves back two characters from the {. So the { character and the space before it are not included.
0
 
LVL 48

Expert Comment

by:Rgonzo1971
ID: 41870347
Hi,

pls try
=LEFT(A1,FIND("{",A1)-1)

Open in new window

0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

746 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

13 Experts available now in Live!

Get 1:1 Help Now