+ Reply to Thread
Results 1 to 4 of 4

Looking for a simple formula to remove unnecessary text from a cell

  1. #1
    Registered User
    Join Date
    09-22-2016
    Location
    Gainesville
    MS-Off Ver
    2016
    Posts
    1

    Looking for a simple formula to remove unnecessary text from a cell

    Hello,

    I have a report that is exported from SalesForce. In the first column the account name list the full account name, which I need to shorten to a simple name

    For example, A1=Alabama Department of Transportation I'd like to have B2=Alabama

    I searched the formula, but I don't think I'm using the correct terminology because I know this is an easy one.

    Thanks in advance for any help.

    Michael
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Looking for a simple formula to remove unnecessary text from a cell

    I went with:

    =LEFT(A2,FIND(" ",A2)-1)

    This fails on two name states though. You could always just compare to an index of state names to call them out.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Looking for a simple formula to remove unnecessary text from a cell

    Try

    =TRIM(LEFT(SUBSTITUTE(A3," ",REPT(" ",255)),255))
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  4. #4
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Looking for a simple formula to remove unnecessary text from a cell

    In your case this is very tough to create a formula for us. Because the short names aren't in the same place for each cell. You can use IF/ELSE with the formula suggested by daffodil11 to get the appropriate short name if you know all the pattern of your names.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Remove unnecessary cells
    By coach.32 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 05-23-2016, 07:19 PM
  2. [SOLVED] How to remove unnecessary cells?
    By figeroa in forum Excel General
    Replies: 2
    Last Post: 11-30-2014, 08:29 AM
  3. Replies: 6
    Last Post: 03-03-2014, 02:28 PM
  4. [SOLVED] Remove unnecessary spaces from column c
    By aviatecar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-30-2013, 01:28 PM
  5. Remove unnecessary code in macro
    By rileyp in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-03-2013, 11:19 PM
  6. Formula to remove text from a cell
    By Backroomgeeza in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 02-18-2013, 02:40 PM
  7. [SOLVED] Code / Add In to remove unnecessary white space
    By Gazza in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-24-2005, 06:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1