Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

# Excel 2007 Formula to Pull Text Before A Certain Character

Posted on 2016-11-02
Medium Priority
91 Views
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
Question by:Escanaba
[X]
###### Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points

LVL 25

Accepted Solution

Brian B earned 2000 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 53

Expert Comment

ID: 41870347
Hi,

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

## Featured Post

Question has a verified solution.

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

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
How to get Spreadsheet Compare 2016 working with the 64 bit version of Office 2016
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabilâ€¦
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
###### Suggested Courses
Course of the Month9 days, 18 hours left to enroll