+ Reply to Thread
Results 1 to 2 of 2

Trim and left formulas

Hybrid View

Jack White Trim and left formulas 07-22-2013, 09:18 PM
Tony Valko Re: Trim and left formulas 07-22-2013, 09:25 PM
  1. #1
    Registered User
    Join Date
    07-12-2013
    Location
    US
    MS-Off Ver
    Excel 2007
    Posts
    1

    Trim and left formulas

    Following is the data copied into excel.

    Teirb FT5567 xxx gghgh ytytyty r.

    First I find and replace all of the Teirb.

    Second I trim the spaces (ex. =trim(a1).

    Third I only the 6 left characters (ex. =left(a1,6).

    My result I'm looking for is FT5567.

    Is there a way to combine the replace, trim, and left formula into one?
    Or at least the trim and left into one formula?


    Thanks,

    Jack

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Trim and left formulas

    Assuming the substring to extract is ALWAYS between the 1st and 2nd space characters.

    =TRIM(MID(SUBSTITUTE(A1," ",REPT(" ",100)),100,100))
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. 2 formulas in one cell Substitute and Trim
    By jimstrongy in forum Excel General
    Replies: 3
    Last Post: 12-29-2011, 01:16 PM
  2. Trim Left With a Date
    By rmb623 in forum Excel General
    Replies: 1
    Last Post: 08-12-2011, 01:34 PM
  3. trim, left, right, middle
    By sarahkatt in forum Excel General
    Replies: 1
    Last Post: 03-16-2011, 02:13 PM
  4. TRIM, LEFT and other excel formula functions in VB
    By ChrisMattock in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-19-2010, 10:00 AM
  5. [SOLVED] trim left of a found word in a text variable
    By MervB in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-15-2005, 06:15 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