+ Reply to Thread
Results 1 to 4 of 4

Extract all text before Final space in cell

  1. #1
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,963

    Extract all text before Final space in cell

    I have a column of 12,000+ titles formatted as below:
    FBA General Acct II
    FBI Posn Cntrl Spec III
    CIA Director V

    For each title, I'd like to strip off the final text string to get to:
    FBA General Acct
    FBI Posn Cntrl Spec
    CIA Director

    How do I do that?

  2. #2
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,065

    Re: Extract all text before Final space in cell

    =LEFT(A1,SEARCH("^^",SUBSTITUTE(A1," ","^^",LEN(A1)-LEN(SUBSTITUTE(A1," ",""))))-1)

    Source:
    http://www.ozgrid.com/forum/showthread.php?t=39983
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  3. #3
    Forum Contributor
    Join Date
    07-24-2012
    Location
    Denver, CO
    MS-Off Ver
    365
    Posts
    230

    Re: Extract all text before Final space in cell

    Another solution, if all of your data is in column A:

    Please Login or Register  to view this content.
    ~~LaffyAffy13~~

    If I have helped you solve your problem, please be sure to click at the bottom left of my post.

    Thanks.

  4. #4
    Valued Forum Contributor
    Join Date
    12-02-2009
    Location
    Austin, Tx
    MS-Off Ver
    Office 365 64-Bit, 2108, build 14326.21018
    Posts
    3,963

    Re: Extract all text before Final space in cell

    Sweet, both a formulaic and a VBA routine. Thanks so much! I also found another formula solution:
    Please Login or Register  to view this content.

+ 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. Extract Rows based on cell value into final sheet.
    By gcf81 in forum Excel General
    Replies: 0
    Last Post: 08-07-2012, 12:01 PM
  2. Finding the final occurence of a space in a string
    By barts185 in forum Excel General
    Replies: 2
    Last Post: 01-12-2012, 09:06 PM
  3. Extract text between # and space
    By bp2010 in forum Excel General
    Replies: 3
    Last Post: 12-21-2010, 07:48 PM
  4. Extract text from string after , before a space
    By Dulanic in forum Excel General
    Replies: 1
    Last Post: 05-24-2010, 08:20 AM
  5. Extract text with space
    By maxthebear in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-01-2009, 08:01 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