?
Solved

Excel 2007 Formula to Pull Text Before A Certain Character

Posted on 2016-11-02
2
Medium Priority
?
82 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
[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
  • Learn & ask questions
2 Comments
 
LVL 24

Accepted Solution

by:
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 52

Expert Comment

by:Rgonzo1971
ID: 41870347
Hi,

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

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

777 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