Solved

Excel 2007 Formula to Pull Text Before A Certain Character

Posted on 2016-11-02
2
72 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 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 51

Expert Comment

by:Rgonzo1971
ID: 41870347
Hi,

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

Open in new window

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

717 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